//
// Infiltration
//

#include "stagesetup.h"

// Characters
#define CHR_MECHANIC             0x30
#define CHR_JONATHAN             0x31
#define CHR_OUTRO_GUARD          0x33
#define CHR_ROCKETLAUNCHER_GUARD 0x34

// Objects
#define OBJ_INTERCEPTOR1     0x02
#define OBJ_INTERCEPTOR2     0x03
#define OBJ_INTERCEPTOR3     0x04
#define OBJ_MAINGATE_SWITCH  0x05
#define OBJ_ANTENNA          0x07
#define OBJ_BUG1_BOND        0x08
#define OBJ_ANTENNA_SWITCH   0x09
#define OBJ_KEYCARD          0x0a
#define OBJ_LIFT1_SWITCH     0x0b
#define OBJ_LIFT2_SWITCH     0x0c
#define OBJ_RADAR_TERMINAL   0x10
#define OBJ_MAINGATE1        0x13
#define OBJ_MAINGATE2        0x14
#define OBJ_MINE1            0x17
#define OBJ_MINE2            0x18
#define OBJ_MINE3            0x19
#define OBJ_MINE4            0x1b
#define OBJ_MINE5            0x1c
#define OBJ_MINE6            0x1d
#define OBJ_BUG2_BOND        0x2e
#define OBJ_AUTOGUN_AT_START 0x35
#define OBJ_BUG1_COOP        0x36
#define OBJ_BUG2_COOP        0x37
#define OBJ_ROCKETLAUNCHER   0x53
#define OBJ_EXPLOSIVE_BRICK  0x54
#define OBJ_HOVERBIKE        0x55

// Stage flags
#define STAGEFLAG_INTERCEPTOR1_DESTROYED  0x00000100
#define STAGEFLAG_INTERCEPTOR2_DESTROYED  0x00000200
#define STAGEFLAG_INTERCEPTOR3_DESTROYED  0x00000400
#define STAGEFLAG_COMMSBUG_PLACED         0x00000800
#define STAGEFLAG_COMMSBUG_MISPLACED      0x00001000
#define STAGEFLAG_ANTENNA_DESTROYED       0x00002000
#define STAGEFLAG_ANTENNA_LOWERED         0x00004000
#define STAGEFLAG_LIFT1_CALLED            0x00008000
#define STAGEFLAG_LIFT2_CALLED            0x00010000
#define STAGEFLAG_HANGAR_ACCESSED         0x00020000
#define STAGEFLAG_MET_JON                 0x00040000
#define STAGEFLAG_RADAR_SHUT_DOWN         0x00080000
#define STAGEFLAG_EXPLOSIVES_PLACED       0x00200000
#define STAGEFLAG_TRIGGER_INTERCEPTOR     0x00400000
#define STAGEFLAG_ENTERED_FINAL_HANGAR    0x00800000
#define STAGEFLAG_INTRO_FINISHED          0x01000000
#define STAGEFLAG_LIFT_SWITCHES_DESTROYED 0x04000000
#define STAGEFLAG_ONE_BUG_WASTED          0x08000000
#define STAGEFLAG_ANY_LASER_DESTROYED     0x10000000

// AI Lists
#define AILIST_OUTRO                      0x040e
#define AILIST_SPAWNED_GUARD              0x040f
#define AILIST_INTRO                      0x0410
#define AILIST_ALERT_WHEN_STOPPED         0x0415
#define AILIST_MECHANIC                   0x0416
#define AILIST_TRAITOR                    0x0417
#define AILIST_INIT_ALERTED_SPAWNED_GUARD 0x041a
#define AILIST_ALERTED_SPAWNED_GUARD      0x041b
#define AILIST_TEMPLATE_GUARD             0x041c
#define AILIST_TROOPER_UNALERTED          0x041d
#define AILIST_DRAGON_UNALERTED           0x041e
#define AILIST_TROOPER_ALERTED            0x041f
#define AILIST_DRAGON_ALERTED             0x0420
#define AILIST_ACTIVATE_AUTOGUN           0x0421
#define AILIST_ACTIVATE_LASERS            0x0424

extern s32 intro[];
extern u32 props[];
extern struct path paths[];
extern struct ailist ailists[];

struct stagesetup setup = {
	NULL,
	NULL,
	NULL,
	intro,
	props,
	paths,
	ailists,
	NULL,
};

u32 props[] = {
	briefing(BRIEFINGTYPE_LOCATION, L_LUE_001)
	briefing(BRIEFINGTYPE_TEXT_PA,  L_LUE_000)
	briefing(BRIEFINGTYPE_TEXT_SA,  L_LUE_002)
	briefing(BRIEFINGTYPE_TEXT_A,   L_LUE_003)

	beginobjective(0, L_LUE_009, (DIFFBIT_A | DIFFBIT_SA | DIFFBIT_PA | DIFFBIT_PD)) // "Shut down air intercept radar"
		complete_flags(STAGEFLAG_RADAR_SHUT_DOWN)
	endobjective

	beginobjective(1, L_LUE_010, (DIFFBIT_SA | DIFFBIT_PA | DIFFBIT_PD)) // "Plant comms device on antenna"
		complete_flags(STAGEFLAG_COMMSBUG_PLACED)
		fail_flags(STAGEFLAG_COMMSBUG_MISPLACED)
		fail_flags(STAGEFLAG_ANTENNA_DESTROYED)
	endobjective

	beginobjective(2, L_LUE_011, (DIFFBIT_PA | DIFFBIT_PD)) // "Disable all robot interceptors"
		complete_flags(STAGEFLAG_INTERCEPTOR1_DESTROYED)
		complete_flags(STAGEFLAG_INTERCEPTOR2_DESTROYED)
		complete_flags(STAGEFLAG_INTERCEPTOR3_DESTROYED)
	endobjective

	beginobjective(3, L_LUE_012, (DIFFBIT_A | DIFFBIT_SA | DIFFBIT_PA | DIFFBIT_PD)) // "Gain access to hangar lift"
		complete_flags(STAGEFLAG_HANGAR_ACCESSED)
		fail_flags(STAGEFLAG_LIFT_SWITCHES_DESTROYED)
	endobjective

	beginobjective(4, L_LUE_013, (DIFFBIT_A | DIFFBIT_SA | DIFFBIT_PA | DIFFBIT_PD)) // "Make contact with CI spy"
		complete_flags(STAGEFLAG_MET_JON)
	endobjective

	tag(0x3c, 5)
	tag(0x3d, 6)
	tag(0x31, 2)
	tag(0x0f, 2)
	lift(0x0100, MODEL_A51_LIFT_HANGAR, PAD_LUE_031E, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_INVINCIBLE | OBJFLAG_UNCOLLECTABLE | OBJFLAG_FORCENOBOUNCE | OBJFLAG_01000000 | OBJFLAG_CANNOT_ACTIVATE, OBJFLAG2_NOFALL | OBJFLAG2_FALLWITHOUTROTATION | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_BULLETPROOF | OBJFLAG2_IMMUNETOEXPLOSIONS, 0, 1000, 0x031e, 0x031f, -1, -1, 0x00000001, 0x00000003, 0x00000000, 0x00000000, 0x0000071c, 0x0010aaaa, 0x14000000)
#if VERSION >= VERSION_PAL_FINAL
	door(0x0100, MODEL_DOOR_ROLLERTRAIN, PAD_LUE_0321, OBJFLAG_DEACTIVATED, OBJFLAG2_AICANNOTUSE, 0, 1000, 0x0000f333, 0x0000c000, 0x000031c7, 0x000031c7, 0x000002fc, DOORFLAG_0004, DOORTYPE_VERTICAL, 0x00000002, 0x0000012c, 0x00000000, 0x00000000, 0x00001900)
#else
	door(0x0100, MODEL_DOOR_ROLLERTRAIN, PAD_LUE_0321, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000c000, 0x000031c7, 0x000031c7, 0x000002fc, DOORFLAG_0004, DOORTYPE_VERTICAL, 0x00000002, 0x0000012c, 0x00000000, 0x00000000, 0x00001900)
#endif
	lift_door(-1, -2, 0)
#if VERSION >= VERSION_PAL_FINAL
	door(0x0100, MODEL_DOOR_ROLLERTRAIN, PAD_LUE_0322, OBJFLAG_DEACTIVATED, OBJFLAG2_INTERACTCHECKLOS | OBJFLAG2_AICANNOTUSE, 0, 1000, 0x0000f333, 0x0000c000, 0x000031c7, 0x000031c7, 0x000002fc, DOORFLAG_0004, DOORTYPE_VERTICAL, 0x00000002, 0x0000012c, 0x00000000, 0x00000000, 0x00001900)
#else
	door(0x0100, MODEL_DOOR_ROLLERTRAIN, PAD_LUE_0322, OBJFLAG_DEACTIVATED, OBJFLAG2_INTERACTCHECKLOS, 0, 1000, 0x0000f333, 0x0000c000, 0x000031c7, 0x000031c7, 0x000002fc, DOORFLAG_0004, DOORTYPE_VERTICAL, 0x00000002, 0x0000012c, 0x00000000, 0x00000000, 0x00001900)
#endif
	lift_door(-1, -4, 1)
	tag(0x39, -2)
	tag(0x3e, 5)
	tag(0x3f, 6)
	tag(0x32, 2)
	tag(0x0e, 2)
	lift(0x0100, MODEL_A51_LIFT_HANGAR, PAD_LUE_0324, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_INVINCIBLE | OBJFLAG_UNCOLLECTABLE | OBJFLAG_FORCENOBOUNCE | OBJFLAG_01000000 | OBJFLAG_CANNOT_ACTIVATE, OBJFLAG2_NOFALL | OBJFLAG2_FALLWITHOUTROTATION | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_BULLETPROOF | OBJFLAG2_IMMUNETOEXPLOSIONS, 0, 1000, 0x0324, 0x0325, -1, -1, 0x00000001, 0x00000003, 0x00000000, 0x00000000, 0x0000071c, 0x0010aaaa, 0x14000000)
	door(0x0100, MODEL_DOOR_ROLLERTRAIN, PAD_LUE_0327, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000c000, 0x000031c7, 0x000031c7, 0x000002fc, DOORFLAG_0004, DOORTYPE_VERTICAL, 0x00000002, 0x0000012c, 0x00000000, 0x00000000, 0x00001900)
	lift_door(-1, -2, 0)
	door(0x0100, MODEL_DOOR_ROLLERTRAIN, PAD_LUE_0328, OBJFLAG_DEACTIVATED, OBJFLAG2_INTERACTCHECKLOS, 0, 1000, 0x0000f333, 0x0000c000, 0x000031c7, 0x000031c7, 0x000002fc, DOORFLAG_0004, DOORTYPE_VERTICAL, 0x00000002, 0x0000012c, 0x00000000, 0x00000000, 0x00001900)
	lift_door(-1, -4, 1)
	tag(0x38, -2)
	door(0x0100, MODEL_DOOR_ROLLERTRAIN, PAD_LUE_0320, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000c000, 0x000031c7, 0x000031c7, 0x000002fc, DOORFLAG_0004, DOORTYPE_VERTICAL, 0x00000004, 0x0000012c, 0x00000000, 0x00000000, 0x00000000)
	door(0x0100, MODEL_DOOR_ROLLERTRAIN, PAD_LUE_0326, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000c000, 0x000031c7, 0x000031c7, 0x000002fc, DOORFLAG_0004, DOORTYPE_VERTICAL, 0x00000004, 0x0000012c, 0x00000000, 0x00000000, 0x00000000)
	tag(0x40, 6)
	tag(0x41, 6)
	tag(0x42, 8)
	tag(0x43, 8)
	tag(0x33, 1)
	lift(0x0100, MODEL_A51_LIFT_CONTROL, PAD_LUE_0329, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_INVINCIBLE | OBJFLAG_UNCOLLECTABLE | OBJFLAG_FORCENOBOUNCE | OBJFLAG_01000000 | OBJFLAG_CANNOT_ACTIVATE, OBJFLAG2_NOFALL | OBJFLAG2_FALLWITHOUTROTATION | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_BULLETPROOF | OBJFLAG2_IMMUNETOEXPLOSIONS, 0, 1000, 0x0329, 0x032a, -1, -1, 0x00000001, 0x00000005, 0x00000000, 0x00000000, 0x0000071c, 0x0010aaaa, 0x16000000)
	door(0x0100, MODEL_A51_VERT_DOOR_ST, PAD_LUE_032E, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000e666, 0x0000e666, 0x00008e38, 0x00008e38, 0x00000444, 0, DOORTYPE_SLIDING, 0x00000000, 0x0000012c, 0x00000000, 0x00000001, 0x00000300)
	door(0x0100, MODEL_A51_VERT_DOOR_ST, PAD_LUE_032F, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000e666, 0x0000e666, 0x00008e38, 0x00008e38, 0x00000444, 0, DOORTYPE_SLIDING, 0x00000000, 0x0000012c, 0x00000000, 0xffffffff, 0x00000000)
	lift_door(-2, -3, 0)
	lift_door(-2, -4, 0)
	door(0x0100, MODEL_A51_VERT_DOOR_ST, PAD_LUE_0330, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000e666, 0x0000e666, 0x00008e38, 0x00008e38, 0x00000444, 0, DOORTYPE_SLIDING, 0x00000000, 0x0000012c, 0x00000000, 0x00000001, 0x00000300)
	door(0x0100, MODEL_A51_VERT_DOOR_ST, PAD_LUE_0331, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000e666, 0x0000e666, 0x00008e38, 0x00008e38, 0x00000444, 0, DOORTYPE_SLIDING, 0x00000000, 0x0000012c, 0x00000000, 0xffffffff, 0x00000000)
	lift_door(-2, -7, 1)
	lift_door(-2, -8, 1)
	chr(SPAWNFLAG_BASICGUARD | SPAWNFLAG_FIXEDHEIGHT, 0x00, PAD_LUE_0354, BODY_A51TROOPER, HEAD_RANDOM, AILIST_TROOPER_UNALERTED, -1, -1, 10000, 100, CHRFLAG0_CAN_RETREAT | CHRFLAG0_SURPRISABLE | CHRFLAG0_CAN_THROW_GRENADES | CHRFLAG0_SKIPSAFETYCHECKS | CHRFLAG0_00008000 | CHRFLAG0_CANLOSEGUN, CHRFLAG1_DOINGIDLEANIMATION, TEAM_ENEMY, SQUADRON_01, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRLEEGUN1, 0x0000, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_MAGSEC4)
	weapon(0x0100, MODEL_CHRGRENADE, 0x0000, OBJFLAG_ASSIGNEDTOCHR | OBJFLAG_WEAPON_AICANNOTUSE, 0, 0, WEAPON_GRENADE)
	chr(SPAWNFLAG_BASICGUARD, 0x01, PAD_LUE_0355, BODY_A51TROOPER, HEAD_RANDOM, AILIST_TROOPER_UNALERTED, -1, -1, 10000, 100, CHRFLAG0_CAN_RETREAT | CHRFLAG0_SURPRISABLE | CHRFLAG0_CAN_THROW_GRENADES | CHRFLAG0_SKIPSAFETYCHECKS | CHRFLAG0_00008000 | CHRFLAG0_CANLOSEGUN, 0, TEAM_ENEMY, SQUADRON_01, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRLEEGUN1, 0x0001, OBJFLAG_ASSIGNEDTOCHR | OBJFLAG_DEACTIVATED, 0, 0, WEAPON_MAGSEC4)
	chr(SPAWNFLAG_BASICGUARD, 0x02, PAD_LUE_0029, BODY_A51TROOPER, HEAD_RANDOM, 0x0402, -1, -1, 1000, 0, CHRFLAG0_CAN_EXAMINE_BODY | CHRFLAG0_CAN_RETREAT | CHRFLAG0_SURPRISABLE | CHRFLAG0_CAN_THROW_GRENADES | CHRFLAG0_SKIPSAFETYCHECKS | CHRFLAG0_00008000 | CHRFLAG0_CANLOSEGUN, 0, TEAM_ENEMY, SQUADRON_01, -1, 0, 2, 0, 20, 0)
	weapon(0x0100, MODEL_CHRLEEGUN1, 0x0002, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_MAGSEC4)
	weapon(0x0100, MODEL_CHRGRENADE, 0x0002, OBJFLAG_ASSIGNEDTOCHR | OBJFLAG_WEAPON_AICANNOTUSE, 0, 0, WEAPON_GRENADE)
	chr(SPAWNFLAG_BASICGUARD, 0x03, PAD_LUE_0012, BODY_A51TROOPER, HEAD_RANDOM, 0x0401, -1, -1, 1000, 0, CHRFLAG0_CAN_EXAMINE_BODY | CHRFLAG0_CAN_RETREAT | CHRFLAG0_SURPRISABLE | CHRFLAG0_CAN_THROW_GRENADES | CHRFLAG0_SKIPSAFETYCHECKS | CHRFLAG0_00008000 | CHRFLAG0_CANLOSEGUN, 0, TEAM_ENEMY, SQUADRON_01, -1, 0, 2, 0, 5, 0)
	weapon(0x0100, MODEL_CHRLEEGUN1, 0x0003, OBJFLAG_ASSIGNEDTOCHR | OBJFLAG_DEACTIVATED, 0, 0, WEAPON_MAGSEC4)
	weapon(0x0100, MODEL_CHRGRENADE, 0x0003, OBJFLAG_ASSIGNEDTOCHR | OBJFLAG_WEAPON_AICANNOTUSE, 0, 0, WEAPON_GRENADE)
	chr(SPAWNFLAG_BASICGUARD, 0x04, PAD_LUE_0010, BODY_A51TROOPER, HEAD_RANDOM, AILIST_TEMPLATE_GUARD, -1, -1, 1000, 100, CHRFLAG0_CAN_EXAMINE_BODY | CHRFLAG0_CAN_RETREAT | CHRFLAG0_SURPRISABLE | CHRFLAG0_CAN_THROW_GRENADES | CHRFLAG0_SKIPSAFETYCHECKS | CHRFLAG0_00008000 | CHRFLAG0_CANLOSEGUN, 0, TEAM_ENEMY, SQUADRON_01, -1, 0, 2, 0, 5, 0)
	chr(SPAWNFLAG_IGNORECOLLISION | SPAWNFLAG_BASICGUARD, 0x05, PAD_LUE_0356, BODY_A51TROOPER, HEAD_RANDOM, 0x040d, -1, -1, 1000, 30, CHRFLAG0_CAN_THROW_GRENADES | CHRFLAG0_SKIPSAFETYCHECKS | CHRFLAG0_CAMP, 0, TEAM_ENEMY, SQUADRON_02, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRLEEGUN1, 0x0005, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_MAGSEC4)
	chr(SPAWNFLAG_IGNORECOLLISION | SPAWNFLAG_BASICGUARD, 0x06, PAD_LUE_0357, BODY_A51TROOPER, HEAD_RANDOM, 0x040d, -1, -1, 1000, 30, CHRFLAG0_CAN_THROW_GRENADES | CHRFLAG0_SKIPSAFETYCHECKS | CHRFLAG0_CAMP, 0, TEAM_ENEMY, SQUADRON_02, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRLEEGUN1, 0x0006, OBJFLAG_ASSIGNEDTOCHR | OBJFLAG_DEACTIVATED, 0, 0, WEAPON_MAGSEC4)
	chr(SPAWNFLAG_BASICGUARD, 0x07, PAD_LUE_0055, BODY_A51TROOPER, HEAD_RANDOM, 0x0403, 0x0370, -1, 1000, 100, CHRFLAG0_GP1 | CHRFLAG0_CAN_THROW_GRENADES | CHRFLAG0_00008000 | CHRFLAG0_CAN_TRAP | CHRFLAG0_CANLOSEGUN, 0, TEAM_ENEMY, SQUADRON_03, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRLEEGUN1, 0x0007, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_MAGSEC4)
	weapon(0x0100, MODEL_CHRGRENADE, 0x0007, OBJFLAG_ASSIGNEDTOCHR | OBJFLAG_WEAPON_AICANNOTUSE, 0, 0, WEAPON_GRENADE)
	chr(SPAWNFLAG_BASICGUARD, 0x08, PAD_LUE_004F, BODY_A51TROOPER, HEAD_RANDOM, 0x0403, 0x0371, -1, 1000, 100, CHRFLAG0_GP1 | CHRFLAG0_CAN_THROW_GRENADES | CHRFLAG0_00008000 | CHRFLAG0_CAN_TRAP | CHRFLAG0_CANLOSEGUN, 0, TEAM_ENEMY, SQUADRON_03, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRLEEGUN1, 0x0008, OBJFLAG_ASSIGNEDTOCHR | OBJFLAG_DEACTIVATED, 0, 0, WEAPON_MAGSEC4)
	weapon(0x0100, MODEL_CHRGRENADE, 0x0008, OBJFLAG_ASSIGNEDTOCHR | OBJFLAG_WEAPON_AICANNOTUSE, 0, 0, WEAPON_GRENADE)
	chr(SPAWNFLAG_BASICGUARD, 0x09, PAD_LUE_003E, BODY_A51TROOPER, HEAD_RANDOM, 0x0404, -1, -1, 1000, 100, CHRFLAG0_CANT_ALERT_GROUP | CHRFLAG0_CAN_RETREAT | CHRFLAG0_SURPRISABLE | CHRFLAG0_CAN_THROW_GRENADES | CHRFLAG0_SQUADALERTANYDIST | CHRFLAG0_HEAR_REQUIRE_LOS | CHRFLAG0_CANLOSEGUN, 0, TEAM_ENEMY, SQUADRON_04, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRLEEGUN1, 0x0009, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_MAGSEC4)
	chr(SPAWNFLAG_BASICGUARD, 0x0c, PAD_LUE_036D, BODY_A51TROOPER, HEAD_RANDOM, AILIST_TROOPER_UNALERTED, -1, -1, 2000, 100, CHRFLAG0_CAN_THROW_GRENADES | CHRFLAG0_FORCESAFETYCHECKS | CHRFLAG0_CAN_HEARSPAWN | CHRFLAG0_CANLOSEGUN, 0, TEAM_ENEMY, SQUADRON_04, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRLEEGUN1, 0x000c, OBJFLAG_ASSIGNEDTOCHR | OBJFLAG_DEACTIVATED, 0, 0, WEAPON_MAGSEC4)
	chr(SPAWNFLAG_BASICGUARD, 0x0d, PAD_LUE_0085, BODY_A51TROOPER, HEAD_RANDOM, AILIST_TROOPER_UNALERTED, -1, -1, 2000, 100, CHRFLAG0_CAN_THROW_GRENADES | CHRFLAG0_FORCESAFETYCHECKS | CHRFLAG0_CAN_HEARSPAWN | CHRFLAG0_CANLOSEGUN, 0, TEAM_ENEMY, SQUADRON_04, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRLEEGUN1, 0x000d, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_MAGSEC4)
	chr(SPAWNFLAG_BASICGUARD, 0x0e, PAD_LUE_0089, BODY_A51TROOPER, HEAD_RANDOM, 0x0405, -1, -1, 1000, 100, CHRFLAG0_CAN_THROW_GRENADES | CHRFLAG0_SKIPSAFETYCHECKS | CHRFLAG0_SQUADALERTANYDIST | CHRFLAG0_CANLOSEGUN, 0, TEAM_ENEMY, SQUADRON_05, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRLEEGUN1, 0x000e, OBJFLAG_ASSIGNEDTOCHR | OBJFLAG_DEACTIVATED, 0, 0, WEAPON_MAGSEC4)
	chr(SPAWNFLAG_BASICGUARD, 0x0f, PAD_LUE_0092, BODY_A51TROOPER, HEAD_RANDOM, 0x0406, -1, -1, 1000, 100, CHRFLAG0_CAN_THROW_GRENADES | CHRFLAG0_SKIPSAFETYCHECKS | CHRFLAG0_CANLOSEGUN, CHRFLAG1_THROWGRENADEFIRST, TEAM_ENEMY, SQUADRON_05, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRLEEGUN1, 0x000f, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_MAGSEC4)
	chr(SPAWNFLAG_BASICGUARD, 0x10, PAD_LUE_036E, BODY_A51TROOPER, HEAD_RANDOM, AILIST_TROOPER_UNALERTED, -1, -1, 1000, 100, CHRFLAG0_CAN_THROW_GRENADES | CHRFLAG0_00008000 | CHRFLAG0_HOLD_POSITION | CHRFLAG0_COVER_TYPE2 | CHRFLAG0_CAN_HEARSPAWN | CHRFLAG0_CANLOSEGUN, 0, TEAM_ENEMY, SQUADRON_06, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRLEEGUN1, 0x0010, OBJFLAG_ASSIGNEDTOCHR | OBJFLAG_DEACTIVATED, 0, 0, WEAPON_MAGSEC4)
	chr(SPAWNFLAG_BASICGUARD, 0x11, PAD_LUE_036F, BODY_A51TROOPER, HEAD_RANDOM, AILIST_TROOPER_UNALERTED, -1, -1, 1000, 100, CHRFLAG0_CAN_THROW_GRENADES | CHRFLAG0_00008000 | CHRFLAG0_HOLD_POSITION | CHRFLAG0_COVER_TYPE2 | CHRFLAG0_CANLOSEGUN, 0, TEAM_ENEMY, SQUADRON_06, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRLEEGUN1, 0x0011, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_MAGSEC4)
	chr(SPAWNFLAG_BASICGUARD, 0x12, PAD_LUE_035A, BODY_A51AIRMAN, HEAD_RANDOM, AILIST_DRAGON_UNALERTED, -1, -1, 1000, 20, CHRFLAG0_CAN_THROW_GRENADES | CHRFLAG0_FORCESAFETYCHECKS | CHRFLAG0_HEAR_REQUIRE_LOS | CHRFLAG0_CANLOSEGUN, 0, TEAM_ENEMY, SQUADRON_07, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRDRAGON, 0x0012, OBJFLAG_ASSIGNEDTOCHR | OBJFLAG_DEACTIVATED, 0, 0, WEAPON_DRAGON)
	chr(SPAWNFLAG_BASICGUARD, 0x13, PAD_LUE_035B, BODY_A51AIRMAN, HEAD_RANDOM, AILIST_DRAGON_UNALERTED, -1, -1, 1000, 20, CHRFLAG0_CAN_THROW_GRENADES | CHRFLAG0_FORCESAFETYCHECKS | CHRFLAG0_HEAR_REQUIRE_LOS | CHRFLAG0_CANLOSEGUN, 0, TEAM_ENEMY, SQUADRON_07, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRDRAGON, 0x0013, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_DRAGON)
	chr(SPAWNFLAG_DONTSHOOTME | SPAWNFLAG_BLUESIGHT, 0x30, PAD_LUE_0358, BODY_OVERALL, HEAD_RANDOM, AILIST_MECHANIC, -1, -1, 1000, 5, CHRFLAG0_SURPRISABLE | CHRFLAG0_SKIPSAFETYCHECKS | CHRFLAG0_CANLOSEGUN, CHRFLAG1_CAN_DRAW_PISTOL, TEAM_NONCOMBAT, SQUADRON_07, -1, 0, 0, 0, 0, 0)
	tag(0x0a, 1)
	key(0x0080, MODEL_KEYCARD, 0x0030, OBJFLAG_ASSIGNEDTOCHR, 0, 0, 0)
	rename_object(-1, WEAPON_KEYCARD4B, L_LUE_031, L_LUE_032, L_LUE_033, L_LUE_034, L_LUE_035) // "Obtain lift key card."
	chr(SPAWNFLAG_BASICGUARD, 0x14, PAD_LUE_035D, BODY_A51AIRMAN, HEAD_RANDOM, AILIST_DRAGON_UNALERTED, -1, -1, 1000, 100, CHRFLAG0_CAN_THROW_GRENADES | CHRFLAG0_SQUADALERTANYDIST | CHRFLAG0_HOLD_POSITION | CHRFLAG0_COVER_TYPE2 | CHRFLAG0_HEAR_REQUIRE_LOS | CHRFLAG0_CANLOSEGUN, CHRFLAG1_ALLOWSOFTCOVER, TEAM_ENEMY, SQUADRON_08, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRDRAGON, 0x0014, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_DRAGON)
	chr(SPAWNFLAG_BASICGUARD, 0x15, PAD_LUE_0362, BODY_A51AIRMAN, HEAD_RANDOM, AILIST_DRAGON_UNALERTED, -1, -1, 1000, 100, CHRFLAG0_CAN_THROW_GRENADES | CHRFLAG0_SQUADALERTANYDIST | CHRFLAG0_HOLD_POSITION | CHRFLAG0_COVER_TYPE2 | CHRFLAG0_HEAR_REQUIRE_LOS | CHRFLAG0_CANLOSEGUN, CHRFLAG1_ALLOWSOFTCOVER, TEAM_ENEMY, SQUADRON_08, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRDRAGON, 0x0015, OBJFLAG_ASSIGNEDTOCHR | OBJFLAG_DEACTIVATED, 0, 0, WEAPON_DRAGON)
	chr(SPAWNFLAG_BASICGUARD, 0x16, PAD_LUE_035C, BODY_A51AIRMAN, HEAD_RANDOM, AILIST_DRAGON_UNALERTED, -1, -1, 1000, 100, CHRFLAG0_CAN_THROW_GRENADES | CHRFLAG0_SQUADALERTANYDIST | CHRFLAG0_HOLD_POSITION | CHRFLAG0_COVER_TYPE2 | CHRFLAG0_HEAR_REQUIRE_LOS | CHRFLAG0_CANLOSEGUN, CHRFLAG1_THROWGRENADEFIRST | CHRFLAG1_ALLOWSOFTCOVER, TEAM_ENEMY, SQUADRON_08, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRDRAGON, 0x0016, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_DRAGON)
	chr(SPAWNFLAG_BASICGUARD, 0x17, PAD_LUE_035E, BODY_A51AIRMAN, HEAD_RANDOM, AILIST_DRAGON_UNALERTED, -1, -1, 1000, 100, CHRFLAG0_CAN_THROW_GRENADES | CHRFLAG0_SQUADALERTANYDIST | CHRFLAG0_HOLD_POSITION | CHRFLAG0_COVER_TYPE2 | CHRFLAG0_HEAR_REQUIRE_LOS | CHRFLAG0_CANLOSEGUN, CHRFLAG1_ALLOWSOFTCOVER, TEAM_ENEMY, SQUADRON_08, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRDRAGON, 0x0017, OBJFLAG_ASSIGNEDTOCHR | OBJFLAG_DEACTIVATED, 0, 0, WEAPON_DRAGON)
	chr(SPAWNFLAG_BASICGUARD, 0x18, PAD_LUE_035F, BODY_A51AIRMAN, HEAD_RANDOM, AILIST_DRAGON_UNALERTED, -1, -1, 1000, 100, CHRFLAG0_CAN_THROW_GRENADES | CHRFLAG0_HEAR_REQUIRE_LOS | CHRFLAG0_CANLOSEGUN, CHRFLAG1_CAN_SNIPE, TEAM_ENEMY, SQUADRON_09, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRDRAGON, 0x0018, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_DRAGON)
	chr(SPAWNFLAG_BASICGUARD, 0x19, PAD_LUE_0361, BODY_A51AIRMAN, HEAD_RANDOM, 0x0407, -1, -1, 1000, 20, CHRFLAG0_CAN_THROW_GRENADES | CHRFLAG0_HEAR_REQUIRE_LOS | CHRFLAG0_CANLOSEGUN, 0, TEAM_ENEMY, SQUADRON_09, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRDRAGON, 0x0019, OBJFLAG_ASSIGNEDTOCHR | OBJFLAG_DEACTIVATED, 0, 0, WEAPON_DRAGON)
	chr(SPAWNFLAG_BASICGUARD, 0x1a, PAD_LUE_0360, BODY_A51AIRMAN, HEAD_RANDOM, AILIST_DRAGON_UNALERTED, -1, -1, 1000, 20, CHRFLAG0_CAN_THROW_GRENADES | CHRFLAG0_HEAR_REQUIRE_LOS | CHRFLAG0_CANLOSEGUN, 0, TEAM_ENEMY, SQUADRON_09, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRDRAGON, 0x001a, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_DRAGON)
	chr(SPAWNFLAG_BASICGUARD, 0x1c, PAD_LUE_0363, BODY_A51AIRMAN, HEAD_RANDOM, AILIST_DRAGON_UNALERTED, -1, -1, 1000, 100, CHRFLAG0_CAN_THROW_GRENADES | CHRFLAG0_FORCESAFETYCHECKS | CHRFLAG0_HEAR_REQUIRE_LOS | CHRFLAG0_CANLOSEGUN, 0, TEAM_ENEMY, SQUADRON_0A, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRDRAGON, 0x001c, OBJFLAG_ASSIGNEDTOCHR | OBJFLAG_DEACTIVATED, 0, 0, WEAPON_DRAGON)
	chr(SPAWNFLAG_BASICGUARD, 0x1d, PAD_LUE_0364, BODY_A51AIRMAN, HEAD_RANDOM, AILIST_DRAGON_UNALERTED, -1, -1, 1000, 100, CHRFLAG0_CAN_RETREAT | CHRFLAG0_CAN_THROW_GRENADES | CHRFLAG0_FORCESAFETYCHECKS | CHRFLAG0_HEAR_REQUIRE_LOS | CHRFLAG0_CANLOSEGUN, 0, TEAM_ENEMY, SQUADRON_0A, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRDRAGON, 0x001d, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_DRAGON)
	chr(SPAWNFLAG_BASICGUARD, 0x1e, PAD_LUE_0365, BODY_A51AIRMAN, HEAD_RANDOM, 0x0408, -1, -1, 1000, 100, CHRFLAG0_CAN_THROW_GRENADES | CHRFLAG0_FORCESAFETYCHECKS | CHRFLAG0_CAN_HEARSPAWN | CHRFLAG0_HEAR_REQUIRE_LOS | CHRFLAG0_CANLOSEGUN, 0, TEAM_ENEMY, SQUADRON_0A, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRDRAGON, 0x001e, OBJFLAG_ASSIGNEDTOCHR | OBJFLAG_DEACTIVATED, 0, 0, WEAPON_DRAGON)
	chr(SPAWNFLAG_BASICGUARD, 0x1f, PAD_LUE_037B, BODY_A51TROOPER, HEAD_RANDOM, GAILIST_IDLE, 0x007d, -1, 1000, 100, CHRFLAG0_SKIPSAFETYCHECKS | CHRFLAG0_NOACCURACYAFTERJAM | CHRFLAG0_CANLOSEGUN, 0, TEAM_ENEMY, SQUADRON_0B, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRLEEGUN1, 0x001f, OBJFLAG_ASSIGNEDTOCHR | OBJFLAG_DEACTIVATED, 0, 0, WEAPON_MAGSEC4)
	chr(SPAWNFLAG_BASICGUARD, 0x22, PAD_LUE_037E, BODY_A51TROOPER, HEAD_RANDOM, GAILIST_IDLE, 0x007d, -1, 1000, 100, CHRFLAG0_SKIPSAFETYCHECKS | CHRFLAG0_NOACCURACYAFTERJAM | CHRFLAG0_CANLOSEGUN, 0, TEAM_ENEMY, SQUADRON_0B, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRLEEGUN1, 0x0022, OBJFLAG_ASSIGNEDTOCHR | OBJFLAG_DEACTIVATED, 0, 0, WEAPON_MAGSEC4)
	chr(SPAWNFLAG_BASICGUARD, 0x20, PAD_LUE_003A, BODY_A51TROOPER, HEAD_RANDOM, GAILIST_IDLE, 0x0077, -1, 1000, 100, CHRFLAG0_NOACCURACYAFTERJAM | CHRFLAG0_COVER_TYPE2 | CHRFLAG0_CANLOSEGUN, 0, TEAM_ENEMY, SQUADRON_0B, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRLEEGUN1, 0x0020, OBJFLAG_ASSIGNEDTOCHR | OBJFLAG_DEACTIVATED, 0, 0, WEAPON_MAGSEC4)
	chr(SPAWNFLAG_BASICGUARD, 0x21, PAD_LUE_0033, BODY_A51TROOPER, HEAD_RANDOM, GAILIST_IDLE, 0x0077, -1, 1000, 100, CHRFLAG0_NOACCURACYAFTERJAM | CHRFLAG0_COVER_TYPE2 | CHRFLAG0_CANLOSEGUN, 0, TEAM_ENEMY, SQUADRON_0B, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRLEEGUN1, 0x0021, OBJFLAG_ASSIGNEDTOCHR | OBJFLAG_DEACTIVATED, 0, 0, WEAPON_MAGSEC4)
	chr(SPAWNFLAG_BASICGUARD, 0x23, PAD_LUE_01BA, BODY_A51AIRMAN, HEAD_RANDOM, GAILIST_IDLE, 0x007d, -1, 1000, 100, CHRFLAG0_CAN_THROW_GRENADES | CHRFLAG0_SKIPSAFETYCHECKS, CHRFLAG1_THROWGRENADEFIRST, TEAM_ENEMY, SQUADRON_0C, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRDRAGON, 0x0023, OBJFLAG_ASSIGNEDTOCHR | OBJFLAG_DEACTIVATED, 0, 0, WEAPON_DRAGON)
	chr(SPAWNFLAG_BASICGUARD, 0x24, PAD_LUE_01B2, BODY_A51AIRMAN, HEAD_RANDOM, GAILIST_IDLE, 0x007d, -1, 1000, 100, CHRFLAG0_CAN_THROW_GRENADES | CHRFLAG0_SKIPSAFETYCHECKS, CHRFLAG1_THROWGRENADEFIRST, TEAM_ENEMY, SQUADRON_0C, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRDRAGON, 0x0024, OBJFLAG_ASSIGNEDTOCHR | OBJFLAG_DEACTIVATED, 0, 0, WEAPON_DRAGON)
	chr(0, 0x25, PAD_LUE_01CE, BODY_A51AIRMAN, HEAD_RANDOM, 0x0419, 0x007d, -1, 1000, 100, CHRFLAG0_SKIPSAFETYCHECKS | CHRFLAG0_CANLOSEGUN, 0, TEAM_ENEMY, SQUADRON_0D, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRDRAGON, 0x0025, OBJFLAG_ASSIGNEDTOCHR | OBJFLAG_DEACTIVATED, 0, 0, WEAPON_DRAGON)
	chr(SPAWNFLAG_ANTINONINTERACTABLE | SPAWNFLAG_BLUESIGHT, 0x31, PAD_LUE_0196, BODY_A51AIRMAN, HEAD_JONATHAN, 0x0425, -1, -1, 1000, 100, CHRFLAG0_CAN_RETREAT | CHRFLAG0_SURPRISABLE | CHRFLAG0_CAN_THROW_GRENADES | CHRFLAG0_FORCESAFETYCHECKS | CHRFLAG0_HEAR_REQUIRE_LOS | CHRFLAG0_CANLOSEGUN, 0, TEAM_ENEMY, SQUADRON_0A, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRDY357, 0x0031, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_DY357MAGNUM)
	chr(0, 0x32, PAD_LUE_0197, BODY_A51TROOPER, HEAD_RANDOM, GAILIST_IDLE, -1, -1, 1000, 100, CHRFLAG0_CAN_RETREAT | CHRFLAG0_SURPRISABLE | CHRFLAG0_CAN_THROW_GRENADES | CHRFLAG0_FORCESAFETYCHECKS | CHRFLAG0_HEAR_REQUIRE_LOS | CHRFLAG0_CANLOSEGUN, 0, TEAM_ENEMY, SQUADRON_0A, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRDRAGON, 0x0032, OBJFLAG_ASSIGNEDTOCHR | OBJFLAG_DEACTIVATED, 0, 0, WEAPON_DRAGON)
	chr(0, 0x33, PAD_LUE_0199, BODY_A51AIRMAN, HEAD_KEN, 0x0425, -1, -1, 1000, 100, CHRFLAG0_CAN_RETREAT | CHRFLAG0_SURPRISABLE | CHRFLAG0_CAN_THROW_GRENADES | CHRFLAG0_FORCESAFETYCHECKS | CHRFLAG0_HEAR_REQUIRE_LOS | CHRFLAG0_CANLOSEGUN, 0, TEAM_ENEMY, SQUADRON_0A, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRDRAGON, 0x0033, OBJFLAG_ASSIGNEDTOCHR | OBJFLAG_DEACTIVATED, 0, 0, WEAPON_DRAGON)
	chr(0, 0x29, PAD_LUE_0158, BODY_LABTECH, HEAD_RANDOM, GAILIST_IDLE, -1, -1, 1000, 100, CHRFLAG0_CAN_RETREAT | CHRFLAG0_SURPRISABLE | CHRFLAG0_CAN_THROW_GRENADES | CHRFLAG0_FORCESAFETYCHECKS | CHRFLAG0_HEAR_REQUIRE_LOS | CHRFLAG0_CANLOSEGUN, 0, TEAM_ENEMY, SQUADRON_0A, -1, 0, 0, 0, 0, 0)
	chr(0, 0x2a, PAD_LUE_0157, BODY_BIOTECH, HEAD_BIOTECH, GAILIST_IDLE, -1, -1, 1000, 100, CHRFLAG0_CAN_RETREAT | CHRFLAG0_SURPRISABLE | CHRFLAG0_CAN_THROW_GRENADES | CHRFLAG0_FORCESAFETYCHECKS | CHRFLAG0_HEAR_REQUIRE_LOS | CHRFLAG0_CANLOSEGUN, 0, TEAM_ENEMY, SQUADRON_0A, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRSONICSCREWER, 0x002a, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_SCREWDRIVER)
	chr(0, 0x2b, PAD_LUE_0156, BODY_BIOTECH, HEAD_BIOTECH, GAILIST_IDLE, -1, -1, 1000, 100, CHRFLAG0_CAN_RETREAT | CHRFLAG0_SURPRISABLE | CHRFLAG0_CAN_THROW_GRENADES | CHRFLAG0_FORCESAFETYCHECKS | CHRFLAG0_HEAR_REQUIRE_LOS | CHRFLAG0_CANLOSEGUN, 0, TEAM_ENEMY, SQUADRON_0A, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRSONICSCREWER, 0x002b, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_SCREWDRIVER)
	tag(0x2f, 1)
	hover_prop(0x0100, MODEL_HOVERBED, PAD_LUE_0155, OBJFLAG_FALL | OBJFLAG_00000100 | OBJFLAG_INVINCIBLE | OBJFLAG_UNCOLLECTABLE | OBJFLAG_01000000 | OBJFLAG_AISEETHROUGH, OBJFLAG2_NOFALL | OBJFLAG2_FALLWITHOUTROTATION | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_BULLETPROOF | OBJFLAG2_IMMUNETOEXPLOSIONS, OBJFLAG3_PUSHABLE | OBJFLAG3_GRABBABLE | OBJFLAG3_HOVERBEDSHIELD, 1000, HOVTYPE_BED)
	chr(0, 0x34, PAD_LUE_040F, BODY_A51TROOPER, HEAD_RANDOM, GAILIST_IDLE, 0x007d, -1, 1000, 100, CHRFLAG0_SKIPSAFETYCHECKS | CHRFLAG0_NOACCURACYAFTERJAM | CHRFLAG0_CANLOSEGUN, 0, TEAM_ENEMY, SQUADRON_0B, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRDYROCKET, 0x0034, OBJFLAG_ASSIGNEDTOCHR | OBJFLAG_DEACTIVATED, 0, 0, WEAPON_ROCKETLAUNCHER)
	tag(0x53, -1)
	chr(0, 0x35, PAD_LUE_009F, BODY_AREA51GUARD, HEAD_RANDOM, GAILIST_IDLE, -1, -1, 1000, 100, CHRFLAG0_CAN_FLANK | CHRFLAG0_SKIPSAFETYCHECKS | CHRFLAG0_HOLD_POSITION, 0, TEAM_ENEMY, SQUADRON_0E, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRLEEGUN1, 0x0035, OBJFLAG_ASSIGNEDTOCHR | OBJFLAG_DEACTIVATED, 0, 0, WEAPON_MAGSEC4)
	weapon(0x0100, MODEL_CHRLEEGUN1, 0x0035, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_MAGSEC4)
	link_guns(-1, -2)
	door(0x0100, MODEL_A51_HORIZ_DOOR_BOT, PAD_LUE_027F, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, DOORFLAG_AUTOMATIC, DOORTYPE_VERTICAL, 0x00000000, 0x0000003c, 0x00000000, 0x00000001, 0x00000100)
	door(0x0100, MODEL_A51_HORIZ_DOOR_TOP, PAD_LUE_027E, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, 0, DOORTYPE_VERTICAL, 0x00000000, 0x0fffffff, 0x00000000, 0xffffffff, 0x00000000)
	door(0x0100, MODEL_A51_HORIZ_DOOR_BOT, PAD_LUE_027D, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, DOORFLAG_AUTOMATIC, DOORTYPE_VERTICAL, 0x00000000, 0x0000003c, 0x00000000, 0x00000001, 0x00000100)
	door(0x0100, MODEL_A51_HORIZ_DOOR_TOP, PAD_LUE_027C, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, 0, DOORTYPE_VERTICAL, 0x00000000, 0x0fffffff, 0x00000000, 0xffffffff, 0x00000000)
	door(0x0100, MODEL_A51_HORIZ_DOOR_BOT, PAD_LUE_027A, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, DOORFLAG_AUTOMATIC, DOORTYPE_VERTICAL, 0x00000000, 0x0000003c, 0x00000000, 0x00000001, 0x00000100)
	door(0x0100, MODEL_A51_HORIZ_DOOR_TOP, PAD_LUE_027B, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, 0, DOORTYPE_VERTICAL, 0x00000000, 0x0fffffff, 0x00000000, 0xffffffff, 0x00000000)
	door(0x0100, MODEL_A51_HORIZ_DOOR_BOT, PAD_LUE_0278, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, DOORFLAG_AUTOMATIC, DOORTYPE_VERTICAL, 0x00000000, 0x0000003c, 0x00000000, 0x00000001, 0x00000100)
	door(0x0100, MODEL_A51_HORIZ_DOOR_TOP, PAD_LUE_0279, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, 0, DOORTYPE_VERTICAL, 0x00000000, 0x0fffffff, 0x00000000, 0xffffffff, 0x00000000)
	door(0x0100, MODEL_A51_HORIZ_DOOR_BOT, PAD_LUE_0277, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, DOORFLAG_AUTOMATIC, DOORTYPE_VERTICAL, 0x00000000, 0x0000003c, 0x00000000, 0x00000001, 0x00000100)
	door(0x0100, MODEL_A51_HORIZ_DOOR_TOP, PAD_LUE_0276, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, 0, DOORTYPE_VERTICAL, 0x00000000, 0x0fffffff, 0x00000000, 0xffffffff, 0x00000000)
	door(0x0100, MODEL_A51_HORIZ_DOOR_BOT, PAD_LUE_0274, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, DOORFLAG_AUTOMATIC, DOORTYPE_VERTICAL, 0x00000000, 0x0000003c, 0x00000000, 0x00000001, 0x00000100)
	door(0x0100, MODEL_A51_HORIZ_DOOR_TOP, PAD_LUE_0275, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, 0, DOORTYPE_VERTICAL, 0x00000000, 0x0fffffff, 0x00000000, 0xffffffff, 0x00000000)
	door(0x0100, MODEL_A51_HORIZ_DOOR_BOT, PAD_LUE_0273, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, DOORFLAG_AUTOMATIC, DOORTYPE_VERTICAL, 0x00000000, 0x0000003c, 0x00000000, 0x00000001, 0x00000100)
	door(0x0100, MODEL_A51_HORIZ_DOOR_TOP, PAD_LUE_0272, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, 0, DOORTYPE_VERTICAL, 0x00000000, 0x0fffffff, 0x00000000, 0xffffffff, 0x00000000)
	door(0x0100, MODEL_A51_HORIZ_DOOR_BOT, PAD_LUE_0270, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, DOORFLAG_AUTOMATIC, DOORTYPE_VERTICAL, 0x00000000, 0x0000003c, 0x00000000, 0x00000001, 0x00000100)
	door(0x0100, MODEL_A51_HORIZ_DOOR_TOP, PAD_LUE_0271, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, 0, DOORTYPE_VERTICAL, 0x00000000, 0x0fffffff, 0x00000000, 0xffffffff, 0x00000000)
	door(0x0100, MODEL_A51_HORIZ_DOOR_BOT, PAD_LUE_026F, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, DOORFLAG_AUTOMATIC, DOORTYPE_VERTICAL, 0x00000000, 0x0000003c, 0x00000000, 0x00000001, 0x00000100)
	door(0x0100, MODEL_A51_HORIZ_DOOR_TOP, PAD_LUE_026E, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, 0, DOORTYPE_VERTICAL, 0x00000000, 0x0fffffff, 0x00000000, 0xffffffff, 0x00000000)
	door(0x0100, MODEL_A51_HORIZ_DOOR_BOT, PAD_LUE_0266, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, DOORFLAG_AUTOMATIC, DOORTYPE_VERTICAL, 0x00000000, 0x0000003c, 0x00000000, 0x00000001, 0x00000100)
	door(0x0100, MODEL_A51_HORIZ_DOOR_TOP, PAD_LUE_0267, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000f333, 0x00085555, 0x00085555, 0x00001999, 0, DOORTYPE_VERTICAL, 0x00000000, 0x0fffffff, 0x00000000, 0xffffffff, 0x00000000)
	door(0x0100, MODEL_A51_HORIZ_DOOR_TOP, PAD_LUE_02A6, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, OBJFLAG2_AICANNOTUSE, 0, 1000, 0x0000f333, 0x0000f333, 0x0001aaaa, 0x0001aaaa, 0x00001999, 0, DOORTYPE_VERTICAL, 0x00000040, 0x0000003c, 0x00000000, 0x00000000, 0x00000100)
	tag(0x11, 2)
	tag(0x12, 2)
#if VERSION >= VERSION_PAL_FINAL
	door(0x0100, MODEL_A51_VERT_DOOR_RIGHT, PAD_LUE_02AF, OBJFLAG_00000010 | OBJFLAG_DEACTIVATED, OBJFLAG2_AICANNOTUSE, 0, 1000, 0x0000cccc, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, 0, DOORTYPE_SLIDING, 0x00000008, 0x00000384, 0x00000000, 0x00000001, 0x00000300)
	door(0x0100, MODEL_A51_VERT_DOOR_LEFT, PAD_LUE_02B0, OBJFLAG_00000010 | OBJFLAG_DEACTIVATED, OBJFLAG2_AICANNOTUSE, 0, 1000, 0x0000cccc, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, 0, DOORTYPE_SLIDING, 0x00000008, 0x00000384, 0x00000000, 0xffffffff, 0x00000000)
#else
	door(0x0100, MODEL_A51_VERT_DOOR_RIGHT, PAD_LUE_02AF, OBJFLAG_00000010 | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000cccc, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, 0, DOORTYPE_SLIDING, 0x00000008, 0x00000384, 0x00000000, 0x00000001, 0x00000300)
	door(0x0100, MODEL_A51_VERT_DOOR_LEFT, PAD_LUE_02B0, OBJFLAG_00000010 | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000cccc, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, 0, DOORTYPE_SLIDING, 0x00000008, 0x00000384, 0x00000000, 0xffffffff, 0x00000000)
#endif
	tag(0x13, 2)
	tag(0x14, 2)
	door(0x0100, MODEL_A51GATE_L, PAD_LUE_02B5, OBJFLAG_00000010 | OBJFLAG_DEACTIVATED, OBJFLAG2_AICANNOTUSE, 0, 1000, 0x0000cccc, 0x00010000, 0x00000ccc, 0x00014000, 0x00000111, 0, DOORTYPE_SLIDING, 0x00000008, 0x00000384, 0x00000000, 0x00000001, 0x00001800)
	door(0x0100, MODEL_A51GATE_R, PAD_LUE_02B6, OBJFLAG_00000010 | OBJFLAG_DEACTIVATED, OBJFLAG2_AICANNOTUSE, 0, 1000, 0x0000cccc, 0x00010000, 0x00000ccc, 0x00014000, 0x00000111, 0, DOORTYPE_SLIDING, 0x00000008, 0x00000384, 0x00000000, 0xffffffff, 0x00001800)
#if VERSION >= VERSION_PAL_FINAL
	door(0x0100, MODEL_A51_VERT_DOOR_ST, PAD_LUE_02B3, OBJFLAG_DEACTIVATED, OBJFLAG2_AICANNOTUSE, 0, 1000, 0x0000e666, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, DOORFLAG_FLIP, DOORTYPE_SLIDING, 0x00000010, 0x00000384, 0x00000000, 0x00000000, 0x00000300)
	door(0x0100, MODEL_A51_VERT_DOOR_ST, PAD_LUE_02B4, OBJFLAG_DEACTIVATED, OBJFLAG2_AICANNOTUSE, 0, 1000, 0x0000e666, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, 0, DOORTYPE_SLIDING, 0x00000010, 0x00000384, 0x00000000, 0x00000000, 0x00000300)
#else
	door(0x0100, MODEL_A51_VERT_DOOR_ST, PAD_LUE_02B3, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000e666, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, DOORFLAG_FLIP, DOORTYPE_SLIDING, 0x00000010, 0x00000384, 0x00000000, 0x00000000, 0x00000300)
	door(0x0100, MODEL_A51_VERT_DOOR_ST, PAD_LUE_02B4, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000e666, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, 0, DOORTYPE_SLIDING, 0x00000010, 0x00000384, 0x00000000, 0x00000000, 0x00000300)
#endif
	door(0x0100, MODEL_A51_VERT_DOOR_ST, PAD_LUE_028C, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000e666, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, DOORFLAG_FLIP, DOORTYPE_SLIDING, 0x00000000, 0x00000384, 0x00000000, 0x00000000, 0x00000300)
	door(0x0100, MODEL_A51_VERT_DOOR_ST, PAD_LUE_028D, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000e666, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, 0, DOORTYPE_SLIDING, 0x00000000, 0x00000384, 0x00000000, 0x00000000, 0x00000300)
	door(0x0100, MODEL_A51_VERT_DOOR_ST, PAD_LUE_0291, OBJFLAG_DEACTIVATED, OBJFLAG2_LOCKEDBACK, 0, 1000, 0x0000f333, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, 0, DOORTYPE_SLIDING, 0x00000004, 0x00000384, 0x00000000, 0x00000000, 0x00000300)
	door(0x0100, MODEL_A51_VERT_DOOR_ST, PAD_LUE_02A9, OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, 0, DOORTYPE_SLIDING, 0x00000000, 0x00000384, 0x00000000, 0x00000000, 0x00000300)
	tag(0x00, 1)
	autogun(0x0100, MODEL_A51_TURRET, PAD_LUE_0380, OBJFLAG_FALL | OBJFLAG_00000100, OBJFLAG2_NOFALL | OBJFLAG2_FALLWITHOUTROTATION, 0, 3000, 0x0028, 0x00020000, 0xfffe0000, 0x000002d8, 0x001e0000)
	autogun(0x0100, MODEL_A51_TURRET, PAD_LUE_0382, OBJFLAG_FALL | OBJFLAG_00000100, OBJFLAG2_NOFALL | OBJFLAG2_FALLWITHOUTROTATION, 0, 3000, 0x002e, 0x00020000, 0xfffe0000, 0x000002d8, 0x001e0000)
	tag(0x01, 1)
	autogun(0x0100, MODEL_A51_TURRET, PAD_LUE_0383, OBJFLAG_FALL | OBJFLAG_00000100, OBJFLAG2_NOFALL | OBJFLAG2_FALLWITHOUTROTATION, 0, 3000, 0x0026, 0x00020000, 0xfffe0000, 0x0000016c, 0x001e0000)
	tag(0x35, 1)
	autogun(0x0100, MODEL_A51_TURRET, PAD_LUE_0381, OBJFLAG_FALL | OBJFLAG_00000100, OBJFLAG2_NOFALL | OBJFLAG2_FALLWITHOUTROTATION, 0, 500, 0x0015, 0x00020000, 0xfffe0000, 0x000002d8, 0x001e0000)
	autogun(0x00c0, MODEL_A51_ROOFGUN, PAD_LUE_0401, OBJFLAG_UPSIDEDOWN, OBJFLAG2_EXCLUDE_SA | OBJFLAG2_EXCLUDE_PA | OBJFLAG2_EXCLUDE_PD | OBJFLAG2_REMOVEWHENDESTROYED, 0, 1000, 0x0366, 0x00004000, 0xffffc000, 0x000000da, 0x00140000)
	autogun(0x00c0, MODEL_A51_ROOFGUN, PAD_LUE_0402, OBJFLAG_UPSIDEDOWN, OBJFLAG2_EXCLUDE_SA | OBJFLAG2_EXCLUDE_PA | OBJFLAG2_EXCLUDE_PD | OBJFLAG2_REMOVEWHENDESTROYED, 0, 1000, 0x0368, 0x00004000, 0xffffc000, 0x000000da, 0x00140000)
	autogun(0x00c0, MODEL_A51_ROOFGUN, PAD_LUE_0403, OBJFLAG_UPSIDEDOWN, OBJFLAG2_EXCLUDE_SA | OBJFLAG2_EXCLUDE_PA | OBJFLAG2_EXCLUDE_PD | OBJFLAG2_REMOVEWHENDESTROYED, 0, 1000, 0x0367, 0x00004000, 0xffffc000, 0x000000da, 0x00140000)
	autogun(0x00c0, MODEL_A51_ROOFGUN, PAD_LUE_0404, OBJFLAG_UPSIDEDOWN, OBJFLAG2_EXCLUDE_SA | OBJFLAG2_EXCLUDE_PA | OBJFLAG2_EXCLUDE_PD | OBJFLAG2_REMOVEWHENDESTROYED, 0, 1000, 0x0369, 0x000031c7, 0xffffce39, 0x000000da, 0x00140000)
	autogun(0x00c0, MODEL_A51_ROOFGUN, PAD_LUE_0401, OBJFLAG_UPSIDEDOWN, OBJFLAG2_EXCLUDE_A | OBJFLAG2_REMOVEWHENDESTROYED, 0, 1000, 0x0366, 0x00004000, 0xffffc000, 0x00000e38, 0x003c0000)
	autogun(0x00c0, MODEL_A51_ROOFGUN, PAD_LUE_0402, OBJFLAG_UPSIDEDOWN, OBJFLAG2_EXCLUDE_A | OBJFLAG2_REMOVEWHENDESTROYED, 0, 1000, 0x0368, 0x00004000, 0xffffc000, 0x00000e38, 0x003c0000)
	autogun(0x00c0, MODEL_A51_ROOFGUN, PAD_LUE_0403, OBJFLAG_UPSIDEDOWN, OBJFLAG2_EXCLUDE_A | OBJFLAG2_REMOVEWHENDESTROYED, 0, 1000, 0x0367, 0x00004000, 0xffffc000, 0x00000e38, 0x003c0000)
	autogun(0x00c0, MODEL_A51_ROOFGUN, PAD_LUE_0404, OBJFLAG_UPSIDEDOWN, OBJFLAG2_EXCLUDE_A | OBJFLAG2_REMOVEWHENDESTROYED, 0, 1000, 0x0369, 0x000031c7, 0xffffce39, 0x00000e38, 0x003c0000)
	tag(0x55, 1)
	hoverbike(0x0100, MODEL_HOVBIKE, PAD_LUE_037A, OBJFLAG_FALL | OBJFLAG_00000100 | OBJFLAG_INVINCIBLE | OBJFLAG_UNCOLLECTABLE | OBJFLAG_01000000 | OBJFLAG_AISEETHROUGH, OBJFLAG2_NOFALL | OBJFLAG2_FALLWITHOUTROTATION | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_BULLETPROOF | OBJFLAG2_IMMUNETOEXPLOSIONS, OBJFLAG3_PUSHABLE | OBJFLAG3_GRABBABLE | OBJFLAG3_GEOCYL, 1000)
	tag(0x02, 1)
	chopper(0x0a00, MODEL_A51INTERCEPTOR, PAD_LUE_0359, OBJFLAG_00000008 | OBJFLAG_00000100 | OBJFLAG_CHOPPER_INIT, OBJFLAG2_INVISIBLE, OBJFLAG3_00000200 | OBJFLAG3_REACTTOSIGHT, 100, 0x040c)
	tag(0x03, 1)
	chopper(0x0a00, MODEL_A51INTERCEPTOR, PAD_LUE_036C, OBJFLAG_00000008 | OBJFLAG_00000100 | OBJFLAG_CHOPPER_INIT, OBJFLAG2_INVISIBLE, OBJFLAG3_00000200 | OBJFLAG3_REACTTOSIGHT, 100, 0x040c)
	tag(0x04, 1)
	chopper(0x0a00, MODEL_A51INTERCEPTOR, PAD_LUE_034E, OBJFLAG_00000008 | OBJFLAG_00000100 | OBJFLAG_CHOPPER_INIT, OBJFLAG2_INVISIBLE, OBJFLAG3_00000200 | OBJFLAG3_REACTTOSIGHT, 100, 0x040a)
	tag(0x05, 1)
	singlemonitor(0x0100, MODEL_MODEMBOX, PAD_LUE_0409, OBJFLAG_00000002 | OBJFLAG_DEACTIVATED, OBJFLAG2_INTERACTCHECKLOS, OBJFLAG3_INTERACTABLE, 1000, 18)
	tag(0x08, 1)
	weapon(0x0180, MODEL_CHRBUG, -1, OBJFLAG_FALL, 0, 0, WEAPON_COMMSRIDER)
	rename_object(-1, WEAPON_COMMSRIDER, L_LUE_021, L_LUE_022, L_LUE_023, L_LUE_024, L_LUE_025) // "Obtain comms rider."
	tag(0x36, 1)
	weapon(0x0180, MODEL_CHRBUG, -1, OBJFLAG_FALL | OBJFLAG_UNCOLLECTABLE, OBJFLAG2_INVISIBLE, 0, WEAPON_COMMSRIDER)
	rename_object(-1, WEAPON_COMMSRIDER, L_LUE_021, L_LUE_022, L_LUE_023, L_LUE_024, L_LUE_025) // "Obtain comms rider."
	tag(0x2e, 1)
	stdobject(0x0100, MODEL_CHRBUG, PAD_LUE_035B, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_COLLECTABLE | OBJFLAG_BOUNCEIFSHOT | OBJFLAG_01000000, OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	rename_object(-1, WEAPON_EXPLOSIVES, L_LUE_048, L_LUE_049, L_LUE_050, L_LUE_051, L_LUE_052) // "Obtain explosive."
	tag(0x37, 1)
	stdobject(0x0100, MODEL_CHRBUG, PAD_LUE_035B, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_UNCOLLECTABLE | OBJFLAG_BOUNCEIFSHOT | OBJFLAG_01000000, OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_INVISIBLE, 0, 1000)
	rename_object(-1, WEAPON_EXPLOSIVES, L_LUE_048, L_LUE_049, L_LUE_050, L_LUE_051, L_LUE_052) // "Obtain explosive."
	tag(0x09, 1)
	singlemonitor(0x0100, MODEL_MODEMBOX, PAD_LUE_0406, OBJFLAG_00000002 | OBJFLAG_DEACTIVATED, OBJFLAG2_IMMUNETOANTI | OBJFLAG2_REMOVEWHENDESTROYED, OBJFLAG3_INTERACTABLE, 1000, 19)
	tag(0x0b, 1)
	singlemonitor(0x0100, MODEL_MODEMBOX, PAD_LUE_0407, OBJFLAG_00000002 | OBJFLAG_DEACTIVATED, OBJFLAG2_IMMUNETOANTI, OBJFLAG3_INTERACTABLE, 1000, 3)
	tag(0x0c, 1)
	singlemonitor(0x0100, MODEL_MODEMBOX, PAD_LUE_0408, OBJFLAG_00000002 | OBJFLAG_DEACTIVATED, OBJFLAG2_IMMUNETOANTI, OBJFLAG3_INTERACTABLE, 1000, 3)
	tag(0x10, 1)
	multimonitor(0x0099, MODEL_PD_CONSOLE, PAD_LUE_04F7, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_INVINCIBLE, OBJFLAG2_INTERACTCHECKLOS, OBJFLAG3_INTERACTABLE, 1000, 3, 3, 0, 0)
	tag(0x54, 1)
	stdobject(0x000c, MODEL_EXPLOSIVEBRICK, PAD_LUE_036B, OBJFLAG_00000008 | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_INVINCIBLE | OBJFLAG_UNCOLLECTABLE | OBJFLAG_FORCENOBOUNCE | OBJFLAG_01000000, OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_INVISIBLE, 0, 1000)
	tag(0x17, 1)
	mine(0x0100, MODEL_CHRPROXIMITYMINE, PAD_LUE_040C, OBJFLAG_00000002, 0, 0, 1000, WEAPON_PROXIMITYMINE)
	tag(0x18, 1)
	mine(0x0100, MODEL_CHRPROXIMITYMINE, PAD_LUE_040D, OBJFLAG_00000002, 0, 0, 1000, WEAPON_PROXIMITYMINE)
	tag(0x19, 1)
	mine(0x0100, MODEL_CHRPROXIMITYMINE, PAD_LUE_040E, OBJFLAG_00000002, 0, 0, 1000, WEAPON_PROXIMITYMINE)
	tag(0x1b, 1)
	mine(0x0100, MODEL_CHRPROXIMITYMINE, PAD_LUE_0410, OBJFLAG_00000002, 0, 0, 1000, WEAPON_PROXIMITYMINE)
	tag(0x1c, 1)
	mine(0x0100, MODEL_CHRPROXIMITYMINE, PAD_LUE_0411, OBJFLAG_00000002, 0, 0, 1000, WEAPON_PROXIMITYMINE)
	tag(0x1d, 1)
	mine(0x0100, MODEL_CHRPROXIMITYMINE, PAD_LUE_0412, OBJFLAG_00000002, 0, 0, 1000, WEAPON_PROXIMITYMINE)
	stdobject(0x0100, MODEL_BARREL, PAD_LUE_0413, OBJFLAG_FALL | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000)
	stdobject(0x0100, MODEL_BARREL, PAD_LUE_0414, OBJFLAG_FALL | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000)
	stdobject(0x0100, MODEL_BARREL, PAD_LUE_0415, OBJFLAG_FALL | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000)
	stdobject(0x0100, MODEL_BARREL, PAD_LUE_0416, OBJFLAG_FALL | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000)
	stdobject(0x0100, MODEL_BARREL, PAD_LUE_0417, OBJFLAG_FALL | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000)
	stdobject(0x0100, MODEL_BARREL, PAD_LUE_0418, OBJFLAG_FALL | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51_CRATE1, PAD_LUE_0311, OBJFLAG_FALL | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_INVINCIBLE, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51_CRATE2, PAD_LUE_0312, OBJFLAG_FALL | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_INVINCIBLE, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51_CRATE3, PAD_LUE_0313, OBJFLAG_FALL | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_INVINCIBLE, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51_CRATE1, PAD_LUE_0314, OBJFLAG_FALL | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_INVINCIBLE, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51_CRATE1, PAD_LUE_0307, OBJFLAG_FALL | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_INVINCIBLE, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51_CRATE2, PAD_LUE_0306, OBJFLAG_FALL | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_INVINCIBLE, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51_CRATE3, PAD_LUE_0305, OBJFLAG_FALL | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_INVINCIBLE, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51_CRATE1, PAD_LUE_0304, OBJFLAG_FALL | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_INVINCIBLE, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51_CRATE1, PAD_LUE_02F9, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_INVINCIBLE, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51_CRATE2, PAD_LUE_02FA, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_INVINCIBLE, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51_CRATE1, PAD_LUE_02FB, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_INVINCIBLE, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51_CRATE2, PAD_LUE_02FC, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_INVINCIBLE, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51_CRATE3, PAD_LUE_02FD, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_INVINCIBLE, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51_CRATE1, PAD_LUE_02FE, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_INVINCIBLE, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51_CRATE2, PAD_LUE_02FF, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_INVINCIBLE, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51_CRATE3, PAD_LUE_0300, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_INVINCIBLE, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51_CRATE1, PAD_LUE_0301, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_INVINCIBLE, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51_CRATE2, PAD_LUE_0302, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_INVINCIBLE, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51_CRATE3, PAD_LUE_0303, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_INVINCIBLE, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51_CRATE1, PAD_LUE_0309, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_INVINCIBLE, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51_CRATE2, PAD_LUE_030A, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_INVINCIBLE, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51_CRATE3, PAD_LUE_030B, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_INVINCIBLE, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51_CRATE1, PAD_LUE_030C, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_INVINCIBLE, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51_CRATE1, PAD_LUE_030D, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_INVINCIBLE, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51_CRATE1, PAD_LUE_030E, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_INVINCIBLE, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51_CRATE1, PAD_LUE_030F, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_INVINCIBLE, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51_CRATE1, PAD_LUE_0310, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_INVINCIBLE, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51_CRATE1, PAD_LUE_02F8, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_INVINCIBLE, 0, 0, 1000)
	tag(0x07, 1)
	lift(0x0100, MODEL_A51DISH, PAD_LUE_033B, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_INVINCIBLE | OBJFLAG_UNCOLLECTABLE | OBJFLAG_FORCENOBOUNCE | OBJFLAG_01000000 | OBJFLAG_CANNOT_ACTIVATE, OBJFLAG2_NOFALL | OBJFLAG2_FALLWITHOUTROTATION | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_BULLETPROOF | OBJFLAG2_IMMUNETOEXPLOSIONS, 0, 1000, 0x033b, 0x033a, -1, -1, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000071c, 0x0010aaaa, 0x00000000)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_LUE_0446, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_INVINCIBLE | OBJFLAG_AISEETHROUGH | OBJFLAG_DEACTIVATED, OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000, 0x0096012c)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_LUE_0445, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_INVINCIBLE | OBJFLAG_AISEETHROUGH | OBJFLAG_DEACTIVATED, OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000, 0x0096012c)
	tag(0x1e, 7)
	tag(0x1f, 7)
	tag(0x20, 7)
	tag(0x21, 7)
	tag(0x22, 7)
	tag(0x23, 7)
	tag(0x24, 7)
#if VERSION >= VERSION_NTSC_1_0
	door(0x0100, MODEL_LASDOOR, PAD_LUE_044A, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_CANNOT_ACTIVATE | OBJFLAG_AISEETHROUGH, OBJFLAG2_THROWTHROUGH, 0, 1000, 0x00011999, 0x00011999, 0x7fffffff, 0x7fffffff, 0x7fffffff, DOORFLAG_DAMAGEONCONTACT | DOORFLAG_UNBLOCKABLEOPEN, DOORTYPE_LASER, 0x00000000, 0x0000003c, 0x00000000, 0x00000000, 0x00000000)
	door(0x0100, MODEL_LASDOOR, PAD_LUE_044B, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_CANNOT_ACTIVATE | OBJFLAG_AISEETHROUGH, OBJFLAG2_THROWTHROUGH, 0, 1000, 0x00011999, 0x00011999, 0x7fffffff, 0x7fffffff, 0x7fffffff, DOORFLAG_DAMAGEONCONTACT | DOORFLAG_UNBLOCKABLEOPEN, DOORTYPE_LASER, 0x00000000, 0x0000003c, 0x00000000, 0x00000000, 0x00000000)
	door(0x0100, MODEL_LASDOOR, PAD_LUE_044C, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_CANNOT_ACTIVATE | OBJFLAG_AISEETHROUGH, OBJFLAG2_THROWTHROUGH, 0, 1000, 0x00011999, 0x00011999, 0x7fffffff, 0x7fffffff, 0x7fffffff, DOORFLAG_DAMAGEONCONTACT | DOORFLAG_UNBLOCKABLEOPEN, DOORTYPE_LASER, 0x00000000, 0x0000003c, 0x00000000, 0x00000000, 0x00000000)
	door(0x0100, MODEL_LASDOOR, PAD_LUE_044D, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_CANNOT_ACTIVATE | OBJFLAG_AISEETHROUGH, OBJFLAG2_THROWTHROUGH, 0, 1000, 0x00011999, 0x00011999, 0x7fffffff, 0x7fffffff, 0x7fffffff, DOORFLAG_DAMAGEONCONTACT | DOORFLAG_UNBLOCKABLEOPEN, DOORTYPE_LASER, 0x00000000, 0x0000003c, 0x00000000, 0x00000000, 0x00000000)
	door(0x0100, MODEL_LASDOOR, PAD_LUE_044E, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_CANNOT_ACTIVATE | OBJFLAG_AISEETHROUGH, OBJFLAG2_THROWTHROUGH, 0, 1000, 0x00011999, 0x00011999, 0x7fffffff, 0x7fffffff, 0x7fffffff, DOORFLAG_DAMAGEONCONTACT | DOORFLAG_UNBLOCKABLEOPEN, DOORTYPE_LASER, 0x00000000, 0x0000003c, 0x00000000, 0x00000000, 0x00000000)
	door(0x0100, MODEL_LASDOOR, PAD_LUE_044F, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_CANNOT_ACTIVATE | OBJFLAG_AISEETHROUGH, OBJFLAG2_THROWTHROUGH, 0, 1000, 0x00011999, 0x00011999, 0x7fffffff, 0x7fffffff, 0x7fffffff, DOORFLAG_DAMAGEONCONTACT | DOORFLAG_UNBLOCKABLEOPEN, DOORTYPE_LASER, 0x00000000, 0x0000003c, 0x00000000, 0x00000000, 0x00000000)
	door(0x0100, MODEL_LASDOOR, PAD_LUE_0450, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_CANNOT_ACTIVATE | OBJFLAG_AISEETHROUGH, OBJFLAG2_THROWTHROUGH, 0, 1000, 0x00011999, 0x00011999, 0x7fffffff, 0x7fffffff, 0x7fffffff, DOORFLAG_DAMAGEONCONTACT | DOORFLAG_UNBLOCKABLEOPEN, DOORTYPE_LASER, 0x00000000, 0x0000003c, 0x00000000, 0x00000000, 0x00000000)
#else
	door(0x0100, MODEL_LASDOOR, PAD_LUE_044A, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_CANNOT_ACTIVATE | OBJFLAG_AISEETHROUGH, OBJFLAG2_THROWTHROUGH | OBJFLAG2_AICANNOTUSE, 0, 1000, 0x00011999, 0x00011999, 0x7fffffff, 0x7fffffff, 0x7fffffff, DOORFLAG_DAMAGEONCONTACT | DOORFLAG_UNBLOCKABLEOPEN, DOORTYPE_LASER, 0x00000000, 0x0000003c, 0x00000000, 0x00000000, 0x00000000)
	door(0x0100, MODEL_LASDOOR, PAD_LUE_044B, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_CANNOT_ACTIVATE | OBJFLAG_AISEETHROUGH, OBJFLAG2_THROWTHROUGH | OBJFLAG2_AICANNOTUSE, 0, 1000, 0x00011999, 0x00011999, 0x7fffffff, 0x7fffffff, 0x7fffffff, DOORFLAG_DAMAGEONCONTACT | DOORFLAG_UNBLOCKABLEOPEN, DOORTYPE_LASER, 0x00000000, 0x0000003c, 0x00000000, 0x00000000, 0x00000000)
	door(0x0100, MODEL_LASDOOR, PAD_LUE_044C, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_CANNOT_ACTIVATE | OBJFLAG_AISEETHROUGH, OBJFLAG2_THROWTHROUGH | OBJFLAG2_AICANNOTUSE, 0, 1000, 0x00011999, 0x00011999, 0x7fffffff, 0x7fffffff, 0x7fffffff, DOORFLAG_DAMAGEONCONTACT | DOORFLAG_UNBLOCKABLEOPEN, DOORTYPE_LASER, 0x00000000, 0x0000003c, 0x00000000, 0x00000000, 0x00000000)
	door(0x0100, MODEL_LASDOOR, PAD_LUE_044D, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_CANNOT_ACTIVATE | OBJFLAG_AISEETHROUGH, OBJFLAG2_THROWTHROUGH | OBJFLAG2_AICANNOTUSE, 0, 1000, 0x00011999, 0x00011999, 0x7fffffff, 0x7fffffff, 0x7fffffff, DOORFLAG_DAMAGEONCONTACT | DOORFLAG_UNBLOCKABLEOPEN, DOORTYPE_LASER, 0x00000000, 0x0000003c, 0x00000000, 0x00000000, 0x00000000)
	door(0x0100, MODEL_LASDOOR, PAD_LUE_044E, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_CANNOT_ACTIVATE | OBJFLAG_AISEETHROUGH, OBJFLAG2_THROWTHROUGH | OBJFLAG2_AICANNOTUSE, 0, 1000, 0x00011999, 0x00011999, 0x7fffffff, 0x7fffffff, 0x7fffffff, DOORFLAG_DAMAGEONCONTACT | DOORFLAG_UNBLOCKABLEOPEN, DOORTYPE_LASER, 0x00000000, 0x0000003c, 0x00000000, 0x00000000, 0x00000000)
	door(0x0100, MODEL_LASDOOR, PAD_LUE_044F, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_CANNOT_ACTIVATE | OBJFLAG_AISEETHROUGH, OBJFLAG2_THROWTHROUGH | OBJFLAG2_AICANNOTUSE, 0, 1000, 0x00011999, 0x00011999, 0x7fffffff, 0x7fffffff, 0x7fffffff, DOORFLAG_DAMAGEONCONTACT | DOORFLAG_UNBLOCKABLEOPEN, DOORTYPE_LASER, 0x00000000, 0x0000003c, 0x00000000, 0x00000000, 0x00000000)
	door(0x0100, MODEL_LASDOOR, PAD_LUE_0450, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_CANNOT_ACTIVATE | OBJFLAG_AISEETHROUGH, OBJFLAG2_THROWTHROUGH | OBJFLAG2_AICANNOTUSE, 0, 1000, 0x00011999, 0x00011999, 0x7fffffff, 0x7fffffff, 0x7fffffff, DOORFLAG_DAMAGEONCONTACT | DOORFLAG_UNBLOCKABLEOPEN, DOORTYPE_LASER, 0x00000000, 0x0000003c, 0x00000000, 0x00000000, 0x00000000)
#endif
	tag(0x25, 1)
	stdobject(0x0100, MODEL_CHRREMOTEMINE, PAD_LUE_0050, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_INVINCIBLE | OBJFLAG_BOUNCEIFSHOT | OBJFLAG_01000000, OBJFLAG2_REMOVEWHENDESTROYED | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_INVISIBLE, 0, 1000)
	tag(0x26, 1)
	stdobject(0x0100, MODEL_CHRREMOTEMINE, PAD_LUE_0050, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_INVINCIBLE | OBJFLAG_BOUNCEIFSHOT | OBJFLAG_01000000, OBJFLAG2_REMOVEWHENDESTROYED | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_INVISIBLE, 0, 1000)
	tag(0x27, 1)
	stdobject(0x0100, MODEL_CHRREMOTEMINE, PAD_LUE_0050, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_INVINCIBLE | OBJFLAG_BOUNCEIFSHOT | OBJFLAG_01000000, OBJFLAG2_REMOVEWHENDESTROYED | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_INVISIBLE, 0, 1000)
	tag(0x28, 1)
	stdobject(0x0100, MODEL_CHRREMOTEMINE, PAD_LUE_0050, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_INVINCIBLE | OBJFLAG_BOUNCEIFSHOT | OBJFLAG_01000000, OBJFLAG2_REMOVEWHENDESTROYED | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_INVISIBLE, 0, 1000)
	tag(0x29, 1)
	stdobject(0x0100, MODEL_CHRREMOTEMINE, PAD_LUE_0050, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_INVINCIBLE | OBJFLAG_BOUNCEIFSHOT | OBJFLAG_01000000, OBJFLAG2_REMOVEWHENDESTROYED | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_INVISIBLE, 0, 1000)
	tag(0x2a, 1)
	stdobject(0x0100, MODEL_CHRREMOTEMINE, PAD_LUE_0050, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_INVINCIBLE | OBJFLAG_BOUNCEIFSHOT | OBJFLAG_01000000, OBJFLAG2_REMOVEWHENDESTROYED | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_INVISIBLE, 0, 1000)
	tag(0x2b, 1)
	stdobject(0x0100, MODEL_CHRREMOTEMINE, PAD_LUE_0050, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_INVINCIBLE | OBJFLAG_BOUNCEIFSHOT | OBJFLAG_01000000, OBJFLAG2_REMOVEWHENDESTROYED | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_INVISIBLE, 0, 1000)
	tag(0x2c, 1)
	stdobject(0x0100, MODEL_CHRREMOTEMINE, PAD_LUE_0050, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_INVINCIBLE | OBJFLAG_BOUNCEIFSHOT | OBJFLAG_01000000, OBJFLAG2_REMOVEWHENDESTROYED | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_INVISIBLE, 0, 1000)
	tag(0x2d, 1)
	stdobject(0x0100, MODEL_CHRREMOTEMINE, PAD_LUE_0050, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_INVINCIBLE | OBJFLAG_BOUNCEIFSHOT | OBJFLAG_01000000, OBJFLAG2_REMOVEWHENDESTROYED | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_INVISIBLE, 0, 1000)
	tag(0x51, 1)
	stdobject(0x0100, MODEL_CHRREMOTEMINE, PAD_LUE_04E8, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_INVINCIBLE | OBJFLAG_BOUNCEIFSHOT | OBJFLAG_01000000, OBJFLAG2_REMOVEWHENDESTROYED | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_INVISIBLE, 0, 1000)
	stdobject(0x0100, MODEL_G5_MAINFRAME, PAD_LUE_04E2, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOANTI, 0, 1000)
	stdobject(0x0100, MODEL_G5_MAINFRAME, PAD_LUE_04E3, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOANTI, 0, 1000)
	stdobject(0x0100, MODEL_G5_MAINFRAME, PAD_LUE_04E4, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOANTI, 0, 1000)
	stdobject(0x0100, MODEL_G5_MAINFRAME, PAD_LUE_04E5, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOANTI, 0, 1000)
	stdobject(0x0100, MODEL_G5_MAINFRAME, PAD_LUE_04E6, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOANTI, 0, 1000)
	stdobject(0x0100, MODEL_G5_MAINFRAME, PAD_LUE_04E7, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOANTI, 0, 1000)
	stdobject(0x0100, MODEL_G5_MAINFRAME, PAD_LUE_04E8, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOANTI, 0, 1000)
	stdobject(0x0100, MODEL_G5_MAINFRAME, PAD_LUE_04E9, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOANTI, 0, 1000)
	stdobject(0x0100, MODEL_G5_MAINFRAME, PAD_LUE_04EA, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOANTI, 0, 1000)
	stdobject(0x0100, MODEL_G5_MAINFRAME, PAD_LUE_04EB, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOANTI, 0, 1000)
	singlemonitor(0x0100, MODEL_MODEMBOX, PAD_LUE_040B, OBJFLAG_00000002 | OBJFLAG_DEACTIVATED, OBJFLAG2_INTERACTCHECKLOS, 0, 1000, 18)
	stdobject(0x0100, MODEL_A51TABLE, PAD_LUE_04D5, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	tag(0x44, 2)
	tag(0x45, 2)
	stdobject(0x0100, MODEL_A51_CRATE1, PAD_LUE_04F8, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_EXCLUDE_A | OBJFLAG2_REMOVEWHENDESTROYED, 0, 1000)
	stdobject(0x0100, MODEL_A51_CRATE1, PAD_LUE_04F9, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_EXCLUDE_A | OBJFLAG2_REMOVEWHENDESTROYED, 0, 1000)
	tag(0x46, 2)
	tag(0x47, 2)
	stdobject(0x0100, MODEL_A51_CRATE1, PAD_LUE_04FA, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_EXCLUDE_A | OBJFLAG2_REMOVEWHENDESTROYED, 0, 1000)
	stdobject(0x0100, MODEL_A51_CRATE1, PAD_LUE_04FB, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_EXCLUDE_A | OBJFLAG2_REMOVEWHENDESTROYED, 0, 1000)
	tag(0x48, 2)
	tag(0x49, 2)
	stdobject(0x0100, MODEL_A51_CRATE1, PAD_LUE_04FC, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_EXCLUDE_A | OBJFLAG2_REMOVEWHENDESTROYED, 0, 1000)
	stdobject(0x0100, MODEL_A51_CRATE1, PAD_LUE_04FD, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_EXCLUDE_A | OBJFLAG2_REMOVEWHENDESTROYED, 0, 1000)
	tag(0x4a, 2)
	tag(0x4b, 2)
	stdobject(0x0100, MODEL_A51_CRATE1, PAD_LUE_04FE, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_EXCLUDE_A | OBJFLAG2_REMOVEWHENDESTROYED, 0, 1000)
	stdobject(0x0100, MODEL_A51_CRATE1, PAD_LUE_04FF, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_EXCLUDE_A | OBJFLAG2_REMOVEWHENDESTROYED, 0, 1000)
	tag(0x4c, 2)
	tag(0x4d, 2)
	stdobject(0x0100, MODEL_A51_CRATE1, PAD_LUE_0500, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_EXCLUDE_A | OBJFLAG2_REMOVEWHENDESTROYED, 0, 1000)
	stdobject(0x0100, MODEL_A51_CRATE1, PAD_LUE_0501, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_EXCLUDE_A | OBJFLAG2_REMOVEWHENDESTROYED, 0, 1000)
	tag(0x4e, 2)
	tag(0x4f, 2)
	stdobject(0x0100, MODEL_A51_CRATE1, PAD_LUE_0502, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_EXCLUDE_A | OBJFLAG2_REMOVEWHENDESTROYED, 0, 1000)
	stdobject(0x0100, MODEL_A51_CRATE1, PAD_LUE_0503, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_EXCLUDE_A | OBJFLAG2_REMOVEWHENDESTROYED, 0, 1000)
	tag(0x50, 2)
	tag(0x52, 2)
	stdobject(0x0100, MODEL_A51_CRATE1, PAD_LUE_0504, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_EXCLUDE_A | OBJFLAG2_REMOVEWHENDESTROYED, 0, 1000)
	stdobject(0x0100, MODEL_A51_CRATE1, PAD_LUE_0505, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_EXCLUDE_A | OBJFLAG2_REMOVEWHENDESTROYED, 0, 1000)
	tag(0x3a, 1)
#if VERSION >= VERSION_JPN_FINAL
	shield(0x0100, MODEL_CHRSHIELD, PAD_LUE_0565, OBJFLAG_FALL, OBJFLAG2_EXCLUDE_PD, 0, 1000)
#else
	shield(0x0100, MODEL_CHRSHIELD, PAD_LUE_0565, OBJFLAG_FALL, OBJFLAG2_EXCLUDE_PA | OBJFLAG2_EXCLUDE_PD, 0, 1000)
#endif
	tag(0x3b, 1)
	shield(0x0100, MODEL_CHRSHIELD, PAD_LUE_0096, OBJFLAG_FALL, OBJFLAG2_EXCLUDE_SA | OBJFLAG2_EXCLUDE_PA | OBJFLAG2_EXCLUDE_PD, 0, 1000)
	endprops
};

s32 intro[] = {
	spawn(PAD_LUE_000F)
	intro_weapon(WEAPON_FALCON2, -1)
	ammo(AMMOTYPE_PISTOL, 100)
	outfit(OUTFIT_DEFAULT)
	endintro
};

s32 path34[] = {
	PAD_LUE_0560,
	PAD_LUE_0563,
	PAD_LUE_0562,
	PAD_LUE_0561,
	-1,
};

s32 path00[] = {
	PAD_LUE_001A,
	PAD_LUE_001D,
	PAD_LUE_001E,
	PAD_LUE_0022,
	PAD_LUE_0024,
	PAD_LUE_0025,
	PAD_LUE_0026,
	PAD_LUE_0025,
	PAD_LUE_0024,
	PAD_LUE_0022,
	PAD_LUE_001E,
	PAD_LUE_001D,
	PAD_LUE_001A,
	PAD_LUE_0019,
	PAD_LUE_0013,
	-1,
};

s32 path01[] = {
	PAD_LUE_0026,
	PAD_LUE_0025,
	PAD_LUE_0024,
	PAD_LUE_0022,
	PAD_LUE_001E,
	PAD_LUE_001D,
	PAD_LUE_001A,
	PAD_LUE_0019,
	PAD_LUE_0013,
	PAD_LUE_0019,
	PAD_LUE_001A,
	PAD_LUE_001D,
	PAD_LUE_001E,
	PAD_LUE_0022,
	PAD_LUE_0024,
	PAD_LUE_0025,
	-1,
};

s32 path02[] = {
	PAD_LUE_0055,
	PAD_LUE_0054,
	PAD_LUE_004F,
	PAD_LUE_004E,
	-1,
};

s32 path03[] = {
	PAD_LUE_003F,
	PAD_LUE_0077,
	PAD_LUE_0078,
	PAD_LUE_0079,
	PAD_LUE_007A,
	PAD_LUE_007B,
	PAD_LUE_007C,
	PAD_LUE_007D,
	PAD_LUE_007E,
	PAD_LUE_007F,
	PAD_LUE_007E,
	PAD_LUE_007D,
	PAD_LUE_007C,
	PAD_LUE_007B,
	PAD_LUE_007A,
	PAD_LUE_0079,
	PAD_LUE_0078,
	PAD_LUE_0077,
	-1,
};

s32 path04[] = {
	PAD_LUE_008D,
	PAD_LUE_008E,
	PAD_LUE_0093,
	PAD_LUE_008E,
	PAD_LUE_0092,
	PAD_LUE_0091,
	PAD_LUE_0090,
	PAD_LUE_008C,
	-1,
};

s32 path05[] = {
	PAD_LUE_0092,
	PAD_LUE_008E,
	PAD_LUE_0093,
	PAD_LUE_008E,
	PAD_LUE_008D,
	PAD_LUE_008C,
	PAD_LUE_0090,
	PAD_LUE_0091,
	-1,
};

s32 unregistered_path1[] = {
	PAD_LUE_01DC,
	PAD_LUE_01B9,
	PAD_LUE_01B8,
	PAD_LUE_01B7,
	PAD_LUE_01B6,
	PAD_LUE_01B5,
	PAD_LUE_01B3,
	PAD_LUE_01B5,
	PAD_LUE_01B6,
	PAD_LUE_01B7,
	PAD_LUE_01B8,
	PAD_LUE_01B9,
	-1,
};

s32 unregistered_path2[] = {
	PAD_LUE_01D6,
	PAD_LUE_01D6,
	PAD_LUE_01D4,
	PAD_LUE_01D3,
	PAD_LUE_01D2,
	PAD_LUE_01D1,
	PAD_LUE_01D2,
	PAD_LUE_01D3,
	PAD_LUE_01D4,
	PAD_LUE_01D6,
	-1,
};

s32 path08[] = {
	PAD_LUE_0506,
	PAD_LUE_0507,
	-1,
};

s32 path09[] = {
	PAD_LUE_0508,
	PAD_LUE_0509,
	PAD_LUE_050A,
	-1,
};

s32 path10[] = {
	PAD_LUE_050B,
	PAD_LUE_050C,
	PAD_LUE_050D,
	PAD_LUE_050E,
	PAD_LUE_050F,
	PAD_LUE_0510,
	-1,
};

s32 path11[] = {
	PAD_LUE_0511,
	PAD_LUE_0512,
	PAD_LUE_0513,
	PAD_LUE_0514,
	-1,
};

s32 path12[] = {
	PAD_LUE_0515,
	PAD_LUE_0516,
	PAD_LUE_0517,
	PAD_LUE_0518,
	PAD_LUE_0519,
	-1,
};

s32 path13[] = {
	PAD_LUE_051A,
	PAD_LUE_051B,
	PAD_LUE_051C,
	PAD_LUE_051D,
	PAD_LUE_051E,
	PAD_LUE_051F,
	-1,
};

s32 path14[] = {
	PAD_LUE_0520,
	PAD_LUE_0521,
	PAD_LUE_0522,
	PAD_LUE_0523,
	PAD_LUE_0524,
	PAD_LUE_0525,
	-1,
};

s32 path15[] = {
	PAD_LUE_0526,
	PAD_LUE_0527,
	PAD_LUE_0528,
	PAD_LUE_0529,
	PAD_LUE_052A,
	PAD_LUE_052B,
	-1,
};

s32 path16[] = {
	PAD_LUE_052C,
	PAD_LUE_052D,
	PAD_LUE_052E,
	PAD_LUE_052F,
	-1,
};

s32 path17[] = {
	PAD_LUE_0530,
	PAD_LUE_0531,
	PAD_LUE_0532,
	PAD_LUE_0533,
	PAD_LUE_0534,
	PAD_LUE_0535,
	-1,
};

s32 path18[] = {
	PAD_LUE_0536,
	PAD_LUE_0537,
	PAD_LUE_0538,
	PAD_LUE_0539,
	-1,
};

s32 path19[] = {
	PAD_LUE_053A,
	PAD_LUE_053B,
	PAD_LUE_053C,
	PAD_LUE_053D,
	PAD_LUE_053E,
	PAD_LUE_053F,
	PAD_LUE_0540,
	PAD_LUE_0541,
	-1,
};

s32 path20[] = {
	PAD_LUE_0542,
	PAD_LUE_0543,
	PAD_LUE_0544,
	-1,
};

s32 path21[] = {
	PAD_LUE_0545,
	PAD_LUE_0546,
	PAD_LUE_0547,
	-1,
};

s32 path22[] = {
	PAD_LUE_0548,
	PAD_LUE_0553,
	-1,
};

s32 path23[] = {
	PAD_LUE_0549,
	PAD_LUE_0552,
	-1,
};

s32 path24[] = {
	PAD_LUE_054A,
	PAD_LUE_0551,
	-1,
};

s32 path25[] = {
	PAD_LUE_054B,
	PAD_LUE_0550,
	-1,
};

s32 path26[] = {
	PAD_LUE_054E,
	PAD_LUE_054D,
	-1,
};

s32 path27[] = {
	PAD_LUE_054F,
	PAD_LUE_054C,
	-1,
};

s32 path28[] = {
	PAD_LUE_0554,
	PAD_LUE_055F,
	-1,
};

s32 path29[] = {
	PAD_LUE_0555,
	PAD_LUE_055E,
	-1,
};

s32 path30[] = {
	PAD_LUE_0556,
	PAD_LUE_055D,
	-1,
};

s32 path31[] = {
	PAD_LUE_0557,
	PAD_LUE_055C,
	-1,
};

s32 path32[] = {
	PAD_LUE_0559,
	PAD_LUE_055A,
	-1,
};

s32 path33[] = {
	PAD_LUE_0558,
	PAD_LUE_055B,
	-1,
};

struct path paths[] = {
	{ path00, 0, 0 },
	{ path01, 1, 0 },
	{ path02, 2, PATHFLAG_CIRCULAR },
	{ path03, 3, 0 },
	{ path04, 4, 0 },
	{ path05, 5, 0 },
	{ path08, 8, 0 },
	{ path09, 9, PATHFLAG_FLYING },
	{ path10, 10, PATHFLAG_FLYING },
	{ path11, 11, PATHFLAG_FLYING },
	{ path12, 12, PATHFLAG_FLYING },
	{ path13, 13, PATHFLAG_FLYING },
	{ path14, 14, PATHFLAG_FLYING },
	{ path15, 15, PATHFLAG_FLYING },
	{ path16, 16, PATHFLAG_FLYING },
	{ path17, 17, PATHFLAG_FLYING },
	{ path18, 18, PATHFLAG_FLYING },
	{ path19, 19, PATHFLAG_FLYING },
	{ path20, 20, PATHFLAG_FLYING },
	{ path21, 21, PATHFLAG_FLYING },
	{ path22, 22, PATHFLAG_FLYING },
	{ path23, 23, PATHFLAG_FLYING },
	{ path24, 24, PATHFLAG_FLYING },
	{ path25, 25, PATHFLAG_FLYING },
	{ path26, 26, PATHFLAG_FLYING },
	{ path27, 27, PATHFLAG_FLYING },
	{ path28, 28, PATHFLAG_FLYING },
	{ path29, 29, PATHFLAG_FLYING },
	{ path30, 30, PATHFLAG_FLYING },
	{ path31, 31, PATHFLAG_FLYING },
	{ path32, 32, PATHFLAG_FLYING },
	{ path33, 33, PATHFLAG_FLYING },
	{ path34, 34, PATHFLAG_FLYING },
	{ NULL, 0, 0 },
};

u8 func0426_8420[] = {
	try_inherit_properties(0x04, /*goto*/ 0x2e)
	label(0x2e)
	set_ailist(CHR_SELF, GAILIST_UNALERTED_0004)
	endlist
};

#define init_path(pathid) \
	set_chr_dodge_rating(2, 10) \
	set_accuracy(6) \
	set_reaction_speed(50) \
	set_chr_maxdamage(CHR_SELF, 40) \
	add_health_or_armor(0) \
	set_recovery_speed(0) \
	set_shield(0) \
	assign_path(pathid) \
	start_patrol \
	set_ailist(CHR_SELF, GAILIST_UNALERTED_0004)

u8 func0401_start_path00[] = {
	init_path(0)
	endlist
};

u8 func0402_start_path01[] = {
	init_path(1)
	endlist
};

u8 func0403_start_path02[] = {
	init_path(2)
	endlist
};

u8 func0404_start_path03[] = {
	init_path(3)
	endlist
};

u8 func0405_start_path04[] = {
	init_path(4)
	endlist
};

u8 func0406_start_path05[] = {
	init_path(5)
	endlist
};

u8 func0407_start_path06[] = {
	assign_path(6)
	start_patrol
	set_ailist(CHR_SELF, GAILIST_UNALERTED_0004)
	endlist
};

u8 func0408_start_path07[] = {
	assign_path(7)
	start_patrol
	set_ailist(CHR_SELF, GAILIST_UNALERTED_0004)
	endlist
};

u8 func0409_set_rotor_speed[] = {
	set_rotor_speed(620, 7200)
	beginloop(0x04)
	endloop(0x04)

	endlist
};

u8 func040b_stop_vehicle[] = {
	set_vehicle_speed(0, 1)

	beginloop(0x04)
	endloop(0x04)

	endlist
};

u8 func0c00_init_intro[] = {
	set_returnlist(CHR_SELF, GAILIST_END_CINEMA)
	set_ailist(CHR_SELF, AILIST_INTRO)
	endlist
};

u8 func140e_check_interceptors_destroyed[] = {
	set_object_flag(OBJ_AUTOGUN_AT_START, OBJFLAG_DEACTIVATED)

	beginloop(0x04)
		if_object_in_good_condition(OBJ_INTERCEPTOR1, /*goto*/ 0x2e)
		if_stage_flag_eq(STAGEFLAG_INTERCEPTOR1_DESTROYED, TRUE, /*goto*/ 0x2e)
		set_stage_flag(STAGEFLAG_INTERCEPTOR1_DESTROYED)
		show_hudmsg(CHR_BOND, L_LUE_019) // "Robot interceptor disabled."

		label(0x2e)
		if_object_in_good_condition(OBJ_INTERCEPTOR2, /*goto*/ 0x2e)
		if_stage_flag_eq(STAGEFLAG_INTERCEPTOR2_DESTROYED, TRUE, /*goto*/ 0x2e)
		set_stage_flag(STAGEFLAG_INTERCEPTOR2_DESTROYED)
		show_hudmsg(CHR_BOND, L_LUE_019) // "Robot interceptor disabled."

		label(0x2e)
		if_object_in_good_condition(OBJ_INTERCEPTOR3, /*goto*/ 0x2e)
		if_stage_flag_eq(STAGEFLAG_INTERCEPTOR3_DESTROYED, TRUE, /*goto*/ 0x2e)
		set_stage_flag(STAGEFLAG_INTERCEPTOR3_DESTROYED)
		show_hudmsg(CHR_BOND, L_LUE_019) // "Robot interceptor disabled."

		label(0x2e)
		if_stage_flag_eq(STAGEFLAG_INTERCEPTOR1_DESTROYED, FALSE, /*goto*/ 0x2e)
		if_stage_flag_eq(STAGEFLAG_INTERCEPTOR2_DESTROYED, FALSE, /*goto*/ 0x2e)
		if_stage_flag_eq(STAGEFLAG_INTERCEPTOR3_DESTROYED, FALSE, /*goto*/ 0x2e)
		show_hudmsg(CHR_BOND, L_LUE_020) // "All robot interceptors disabled."

		set_ailist(CHR_SELF, GAILIST_IDLE)
		label(0x2e)
	endloop(0x04)

	endlist
};

u8 func100c_maingate_switch[] = {
	beginloop(0x04)
		chr_toggle_p1p2(CHR_SELF)
		if_door_state(OBJ_MAINGATE1, DOORSTATE_CLOSING, /*goto*/ 0x2e)
		goto_next(0x06)

		label(0x2e)
		set_object_image(OBJ_MAINGATE_SWITCH, 0, TVCMDLIST_12)
		label(0x06)
		if_chr_activated_object(CHR_P1P2, OBJ_MAINGATE_SWITCH, /*goto*/ 0x2e)
		reloop(0x04)

		label(0x2e)
		assign_sound(SFX_043F, CHANNEL_7)
		play_sound_from_entity(CHANNEL_7, OBJ_MAINGATE_SWITCH, 0x012c, 0x0190, 0x00)
		set_object_image(OBJ_MAINGATE_SWITCH, 0, TVCMDLIST_13)
		if_door_state(OBJ_MAINGATE1, (DOORSTATE_OPEN | DOORSTATE_OPENING), /*goto*/ 0x2e)
		show_hudmsg(CHR_P1P2, L_LUE_043) // "Main gate has been opened."
		open_door(OBJ_MAINGATE1)
		open_door(OBJ_MAINGATE2)
		restart_timer

		beginloop(0x09)
			if_timer_gt(120, /*goto*/ 0x06)
		endloop(0x09)

		label(0x06)
		reloop(0x04)

		label(0x2e)
		assign_sound(SFX_043F, CHANNEL_7)
		play_sound_from_entity(CHANNEL_7, OBJ_MAINGATE_SWITCH, 0x012c, 0x0190, 0x00)
		set_object_image(OBJ_MAINGATE_SWITCH, 0, TVCMDLIST_12)
		show_hudmsg(CHR_P1P2, L_LUE_044) // "Main gate has been closed."
		close_door(OBJ_MAINGATE1)
		close_door(OBJ_MAINGATE2)
		restart_timer

		beginloop(0x0a)
			if_timer_gt(120, /*goto*/ 0x06)
		endloop(0x0a)

		label(0x06)
	endloop(0x04)

	endlist
};

u8 func1400_give_bugs[] = {
	yield
	set_chr_team(CHR_ANTI, TEAM_ENEMY)
	if_difficulty_lt(DIFF_SA, /*goto*/ 0x2e)
	give_object_to_chr(OBJ_BUG1_BOND, CHR_BOND)
	label(0x2e)
	give_object_to_chr(OBJ_BUG2_BOND, CHR_BOND)
	if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x2e)
	if_difficulty_lt(DIFF_SA, /*goto*/ 0x2e)
	give_object_to_chr(OBJ_BUG1_COOP, CHR_COOP)
	label(0x2e)
	give_object_to_chr(OBJ_BUG2_COOP, CHR_COOP)
	set_ailist(CHR_SELF, GAILIST_REBUILD_GROUPS)
	label(0x2e)
	set_ailist(CHR_SELF, GAILIST_REBUILD_GROUPS)
	endlist
};

#define check_bug_wasted(chr) \
	yield \
	beginloop(0x00) \
		if_ammo_quantity_lt(chr, AMMOTYPE_BUG, 1, /*goto*/ 0x2e) \
	endloop(0x00) \
 \
	beginloop(0x2e) \
		if_weapon_thrown(WEAPON_COMMSRIDER, /*goto*/ 0x06) \
	endloop(0x2e) \
 \
	label(0x06) \
	restart_timer \
 \
	beginloop(0x09) \
		if_weapon_thrown_on_object(WEAPON_COMMSRIDER, OBJ_ANTENNA, /*goto*/ 0x0a) \
		if_timer_gt(120, /*goto*/ 0x0b) \
	endloop(0x09) \
 \
	label(0x0a) \
	set_stage_flag(STAGEFLAG_COMMSBUG_PLACED) \
	show_hudmsg(chr, 0x2c1a) /* "Communications bug placed correctly." */ \
	set_ailist(CHR_SELF, GAILIST_IDLE) \
 \
	label(0x0b) \
	if_stage_flag_eq(STAGEFLAG_ONE_BUG_WASTED, TRUE, /*goto*/ 0x2e) \
	set_stage_flag(STAGEFLAG_ONE_BUG_WASTED) \
	set_ailist(CHR_SELF, GAILIST_IDLE) \
 \
	label(0x2e) \
	set_stage_flag(STAGEFLAG_COMMSBUG_MISPLACED) \
	show_hudmsg(chr, 0x2c1b) /* "Communications bug placed incorrectly." */ \
	set_ailist(CHR_SELF, GAILIST_IDLE)

/**
 * @unused
 */
u8 func0422_check_bug_wasted_target[] = {
	check_bug_wasted(CHR_TARGET)
	endlist
};

u8 func1003_check_bug_wasted_bond[] = {
	set_target_chr(CHR_BOND)
	check_bug_wasted(CHR_BOND)
	endlist
};

u8 func1023_check_bug_wasted_coop[] = {
	if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x2e)
	set_target_chr(CHR_COOP)
	goto_next(0x06)

	label(0x2e)
	set_stage_flag(STAGEFLAG_ONE_BUG_WASTED)
	set_ailist(CHR_SELF, GAILIST_IDLE)

	label(0x06)
	check_bug_wasted(CHR_COOP)
	endlist
};

u8 func1004_check_antenna_destroyed[] = {
	beginloop(0x04)
		if_object_in_good_condition(OBJ_ANTENNA, /*goto*/ 0x2e)
		show_hudmsg(CHR_BOND, L_LUE_028) // "Antenna has been destroyed."
		set_stage_flag(STAGEFLAG_ANTENNA_DESTROYED)
		set_ailist(CHR_SELF, GAILIST_IDLE)
		label(0x2e)
	endloop(0x04)

	endlist
};

u8 func1405_antenna_switch[] = {
	set_object_flag(OBJ_ANTENNA, OBJFLAG_DEACTIVATED)

	beginloop(0x04)
		chr_toggle_p1p2(CHR_SELF)
		if_chr_activated_object(CHR_P1P2, OBJ_ANTENNA_SWITCH, /*goto*/ 0x2e)
		reloop(0x04)

		label(0x2e)
		if_stage_flag_eq(STAGEFLAG_ANTENNA_LOWERED, TRUE, /*goto*/ 0x06)
#if VERSION >= VERSION_NTSC_1_0
		play_sound_from_object2(CHANNEL_9, OBJ_ANTENNA_SWITCH, SFX_DOOR_801E, PSTYPE_NONE, 0)
		play_sound_from_object2(CHANNEL_1, OBJ_ANTENNA, SFX_00CD, PSTYPE_NONE, PSFLAG_REPEATING)
#else
		assign_sound(SFX_00CD, CHANNEL_1)
		set_object_sound_playing(CHANNEL_1, OBJ_ANTENNA_SWITCH, TRUE)
#endif
		set_object_image(OBJ_ANTENNA_SWITCH, 0, TVCMDLIST_12)
		unset_object_flag(OBJ_ANTENNA, OBJFLAG_DEACTIVATED)
		show_hudmsg(CHR_P1P2, L_LUE_030) // "Antenna lowered."
		set_stage_flag(STAGEFLAG_ANTENNA_LOWERED)
		restart_timer

#if VERSION >= VERSION_NTSC_1_0
		beginloop(0x09)
			if_timer_gt(20, /*goto*/ 0x2e)
			reloop(0x09)

			label(0x2e)
			if_lift_stationary(OBJ_ANTENNA, /*goto*/ 0x2e)
		endloop(0x09)
#else
		beginloop(0x09)
			if_timer_gt(270, /*goto*/ 0x2e)
		endloop(0x09)
#endif

		label(0x2e)
		mute_channel(CHANNEL_1)
#if VERSION >= VERSION_NTSC_1_0
		play_sound_from_object2(CHANNEL_9, OBJ_ANTENNA_SWITCH, SFX_DOOR_801F, PSTYPE_NONE, 0)
#endif
		set_object_flag(OBJ_ANTENNA, OBJFLAG_DEACTIVATED)
		reloop(0x04)

		label(0x06)
#if VERSION >= VERSION_NTSC_1_0
		play_sound_from_object2(CHANNEL_9, OBJ_ANTENNA_SWITCH, SFX_DOOR_801E, PSTYPE_NONE, 0)
		play_sound_from_object2(CHANNEL_1, OBJ_ANTENNA, SFX_00CD, PSTYPE_NONE, PSFLAG_REPEATING)
#else
		assign_sound(SFX_00CD, CHANNEL_1)
		set_object_sound_playing(CHANNEL_1, OBJ_ANTENNA_SWITCH, TRUE)
#endif
		set_object_image(OBJ_ANTENNA_SWITCH, 0, TVCMDLIST_13)
		unset_object_flag(OBJ_ANTENNA, OBJFLAG_DEACTIVATED)
		unset_stage_flag(STAGEFLAG_ANTENNA_LOWERED)
		show_hudmsg(CHR_P1P2, L_LUE_029) // "Antenna raised."
		restart_timer

#if VERSION >= VERSION_NTSC_1_0
		beginloop(0x0a)
			if_timer_gt(20, /*goto*/ 0x2e)
			reloop(0x0a)

			label(0x2e)
			if_lift_stationary(OBJ_ANTENNA, /*goto*/ 0x2e)
		endloop(0x0a)
#else
		beginloop(0x0a)
			if_timer_gt(270, /*goto*/ 0x2e)
		endloop(0x0a)
#endif

		label(0x2e)
		mute_channel(CHANNEL_1)
#if VERSION >= VERSION_NTSC_1_0
		play_sound_from_object2(CHANNEL_9, OBJ_ANTENNA_SWITCH, SFX_DOOR_801F, PSTYPE_NONE, 0)
#endif
		set_object_flag(OBJ_ANTENNA, OBJFLAG_DEACTIVATED)
	endloop(0x04)

	endlist
};

u8 func1006_lift_switches[] = {
	beginloop(0x04)
		chr_toggle_p1p2(CHR_SELF)
		if_chr_activated_object(CHR_P1P2, OBJ_LIFT1_SWITCH, /*goto*/ 0x09)
		if_chr_activated_object(CHR_P1P2, OBJ_LIFT2_SWITCH, /*goto*/ 0x0a)
		reloop(0x04)

		label(0x09)
		assign_sound(SFX_043F, CHANNEL_7)
		play_sound_from_entity(CHANNEL_7, OBJ_LIFT1_SWITCH, 0x012c, 0x0190, 0x00)
		if_chr_has_object(CHR_P1P2, OBJ_KEYCARD, /*goto*/ 0x2e)
		show_hudmsg(CHR_P1P2, L_LUE_036) // "Lift access denied - key card needed."
		goto_next(0x0b)

		label(0x2e)
		set_object_image(OBJ_LIFT1_SWITCH, 0, TVCMDLIST_13)
		if_stage_flag_eq(STAGEFLAG_LIFT1_CALLED, TRUE, /*goto*/ 0x06)
		set_stage_flag(STAGEFLAG_LIFT1_CALLED)
		open_door(0x0e)
		open_door(0x38)
		unlock_door(0x0e, 0x02)
		unlock_door(0x38, 0x02)
		show_hudmsg(CHR_P1P2, L_LUE_037) // "Key card accepted - lift operational."
		goto_next(0x0b)

		label(0x06)
		show_hudmsg(CHR_P1P2, L_LUE_038) // "Lift is fully operational."
		goto_next(0x0b)

		label(0x0a)
		assign_sound(SFX_043F, CHANNEL_7)
		play_sound_from_entity(CHANNEL_7, OBJ_LIFT2_SWITCH, 0x012c, 0x0190, 0x00)
#if VERSION >= VERSION_PAL_BETA
		if_chr_has_object(CHR_P1P2, OBJ_KEYCARD, /*goto*/ 0x2e)
#else
		if_chr_has_object(CHR_BOND, OBJ_KEYCARD, /*goto*/ 0x2e)
#endif
		show_hudmsg(CHR_P1P2, L_LUE_036) // "Lift access denied - key card needed."
		goto_next(0x0b)

		label(0x2e)
		set_object_image(OBJ_LIFT2_SWITCH, 0, TVCMDLIST_13)
		if_stage_flag_eq(STAGEFLAG_LIFT2_CALLED, TRUE, /*goto*/ 0x06)
		set_stage_flag(STAGEFLAG_LIFT2_CALLED)
		open_door(0x0f)
		open_door(0x39)
		yield
		yield
		unlock_door(0x0f, 0x02)
		unlock_door(0x39, 0x02)
		show_hudmsg(CHR_P1P2, L_LUE_037) // "Key card accepted - lift operational."
		goto_next(0x0b)

		label(0x06)
		show_hudmsg(CHR_P1P2, L_LUE_038) // "Lift is fully operational."
		goto_next(0x0b)

		label(0x0b)
		restart_timer

		beginloop(0x0c)
			if_timer_gt(120, /*goto*/ 0x06)
		endloop(0x0c)

		label(0x06)
	endloop(0x04)

	endlist
};

u8 func1007_check_hangar_accessed[] = {
	beginloop(0x04)
		chr_toggle_p1p2(CHR_SELF)
		if_chr_in_room(CHR_P1P2, 0x00, 0x0042, /*goto*/ 0x06)
		if_chr_in_room(CHR_P1P2, 0x00, 0x0043, /*goto*/ 0x06)
	endloop(0x04)

	label(0x06)
	set_stage_flag(STAGEFLAG_HANGAR_ACCESSED)
	show_hudmsg(CHR_P1P2, L_LUE_039) // "Hangar has been accessed."
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func1008_check_end_level[] = {
	beginloop(0x04)
		if_door_state(0x11, (DOORSTATE_OPEN | DOORSTATE_CLOSING | DOORSTATE_OPENING), /*goto*/ 0x09)
		if_door_state(0x12, (DOORSTATE_OPEN | DOORSTATE_CLOSING | DOORSTATE_OPENING), /*goto*/ 0x09)
	endloop(0x04)

	beginloop(0x09)
		chr_toggle_p1p2(CHR_SELF)
		if_chr_in_room(CHR_P1P2, 0x00, 0x0060, /*goto*/ 0x06)
	endloop(0x09)

	label(0x06)
	show_hudmsg(CHR_P1P2, L_LUE_040) // "Met up with CI agent."
	set_stage_flag(STAGEFLAG_MET_JON)
	yield
	yield
	if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x2e)
	if_chr_dead(CHR_BOND, /*goto*/ 0x2e)
	if_chr_knockedout(CHR_BOND, /*goto*/ 0x2e)
	goto_next(0x06)

	label(0x2e)
	if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x2e)
	if_chr_dead(CHR_COOP, /*goto*/ 0x2e)
	if_chr_knockedout(CHR_COOP, /*goto*/ 0x2e)
	goto_next(0x06)

	label(0x2e)
	end_level
	set_ailist(CHR_SELF, GAILIST_IDLE)

	label(0x06)
	set_invincible(CHR_BOND)
	set_ailist(CHR_SELF, AILIST_OUTRO)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func1009_check_radar_shut_down[] = {
	beginloop(0x04)
		if_object_in_good_condition(OBJ_RADAR_TERMINAL, /*goto*/ 0x06)
		goto_next(0x2e)
		label(0x06)
	endloop(0x04)

	label(0x2e)
	show_hudmsg(CHR_BOND, L_LUE_041) // "Air intercept radar shut down."
	mute_channel(CHANNEL_0)
	set_stage_flag(STAGEFLAG_RADAR_SHUT_DOWN)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func100b_final_hangar[] = {
	beginloop(0x04)
		chr_toggle_p1p2(CHR_SELF)
		if_objective_complete(0, /*goto*/ 0x2e)
		reloop(0x04)

		label(0x2e)
		if_difficulty_lt(DIFF_SA, /*goto*/ 0x2e)
		if_objective_complete(1, /*goto*/ 0x2e)
		reloop(0x04)

		label(0x2e)
		if_difficulty_lt(DIFF_PA, /*goto*/ 0x2e)
		if_objective_complete(2, /*goto*/ 0x2e)
		reloop(0x04)

		label(0x2e)
		if_objective_complete(3, /*goto*/ 0x2e)
		reloop(0x04)

		label(0x2e)
		if_chr_distance_to_pad_lt(CHR_P1P2, 200, PAD_LUE_01D2, /*goto*/ 0x2e)
	endloop(0x04)

	label(0x2e)
	set_stage_flag(STAGEFLAG_ENTERED_FINAL_HANGAR)
	play_x_track(XREASON_DEFAULT, 10, 60)
	restart_timer
	unlock_door(0x11, 0x08)
	unlock_door(0x12, 0x08)
	try_spawn_chr_at_pad(BODY_A51AIRMAN, HEAD_RANDOM, PAD_LUE_01C6, 0x0411, SPAWNFLAG_ALLOWONSCREEN | SPAWNFLAG_BASICGUARD, /*goto*/ 0x09)

	beginloop(0x09)
		if_timer_gt(30, /*goto*/ 0x06)
	endloop(0x09)

	label(0x06)
	try_spawn_chr_at_pad(BODY_A51AIRMAN, HEAD_RANDOM, PAD_LUE_01C6, 0x0412, SPAWNFLAG_ALLOWONSCREEN | SPAWNFLAG_BASICGUARD, /*goto*/ 0x0a)

	beginloop(0x0a)
		if_timer_gt(60, /*goto*/ 0x06)
	endloop(0x0a)

	label(0x06)
	try_spawn_chr_at_pad(BODY_A51AIRMAN, HEAD_RANDOM, PAD_LUE_01C6, 0x0413, SPAWNFLAG_ALLOWONSCREEN | SPAWNFLAG_BASICGUARD, /*goto*/ 0x0b)

	beginloop(0x0b)
		if_timer_gt(90, /*goto*/ 0x06)
	endloop(0x0b)

	label(0x06)
	try_spawn_chr_at_pad(BODY_A51AIRMAN, HEAD_RANDOM, PAD_LUE_01C6, 0x0414, SPAWNFLAG_ALLOWONSCREEN | SPAWNFLAG_BASICGUARD, /*goto*/ 0x0c)

	// @bug: This timer check will pass immediately.
	// It was probably intended to be 120.
	beginloop(0x0c)
		if_timer_gt(1, /*goto*/ 0x06)
	endloop(0x0c)

	label(0x06)

	// This guard will shoot the spawned guards above, but this guard is NOT Jon
	beginloop(0x60)
		try_spawn_chr_at_pad(BODY_A51AIRMAN, HEAD_RANDOM, PAD_LUE_01C6, AILIST_TRAITOR, SPAWNFLAG_ALLOWONSCREEN | SPAWNFLAG_BASICGUARD, /*goto*/ 0x0d)
	endloop(0x60)

	label(0x0d)
	yield
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func0411_init_hangar_guard1[] = {
	set_chr_dodge_rating(2, 10)
	set_accuracy(8)
	set_reaction_speed(30)
	set_chr_maxdamage(CHR_SELF, 40)
	add_health_or_armor(10)
	set_recovery_speed(35)
	set_shield(0)
	set_squadron(SQUADRON_0B)
	set_self_flag_bankx(CHRFLAG1_NOIDLEANIMS, BANK_1)
	set_self_chrflag(CHRCFLAG_NOFRIENDLYFIRE)
	set_chr_id(0x2c)
	set_self_flag_bankx(CHRFLAG0_CAMP, BANK_0)
	set_self_flag_bankx(CHRFLAG0_SKIPSAFETYCHECKS, BANK_0)
	try_equip_weapon(MODEL_CHRDRAGON, WEAPON_DRAGON, 0x00000000, /*goto*/ 0x06)
	label(0x06)
	jog_to_pad(PAD_LUE_0420)
	yield
	set_ailist(CHR_SELF, AILIST_ALERT_WHEN_STOPPED)
	endlist
};

u8 func0412_init_hangar_guard2[] = {
	set_chr_dodge_rating(2, 10)
	set_accuracy(8)
	set_reaction_speed(30)
	set_chr_maxdamage(CHR_SELF, 40)
	add_health_or_armor(10)
	set_recovery_speed(35)
	set_shield(0)
	set_self_flag_bankx(CHRFLAG1_NOIDLEANIMS, BANK_1)
	set_squadron(SQUADRON_0B)
	set_self_chrflag(CHRCFLAG_NOFRIENDLYFIRE)
	set_chr_id(0x2d)
	set_self_flag_bankx(CHRFLAG0_CAMP, BANK_0)
	set_self_flag_bankx(CHRFLAG0_SKIPSAFETYCHECKS, BANK_0)
	try_equip_weapon(MODEL_CHRDRAGON, WEAPON_DRAGON, 0x00000000, /*goto*/ 0x06)
	label(0x06)
	jog_to_pad(PAD_LUE_041F)
	yield
	set_ailist(CHR_SELF, AILIST_ALERT_WHEN_STOPPED)
	endlist
};

u8 func0413_init_hangar_guard3[] = {
	set_chr_dodge_rating(2, 10)
	set_accuracy(8)
	set_reaction_speed(30)
	set_chr_maxdamage(CHR_SELF, 40)
	add_health_or_armor(10)
	set_recovery_speed(35)
	set_shield(0)
	set_self_flag_bankx(CHRFLAG1_NOIDLEANIMS, BANK_1)
	set_squadron(SQUADRON_0B)
	set_self_chrflag(CHRCFLAG_NOFRIENDLYFIRE)
	set_chr_id(0x2e)
	set_self_flag_bankx(CHRFLAG0_CAMP, BANK_0)
	set_self_flag_bankx(CHRFLAG0_SKIPSAFETYCHECKS, BANK_0)
	try_equip_weapon(MODEL_CHRDRAGON, WEAPON_DRAGON, 0x00000000, /*goto*/ 0x06)
	label(0x06)
	jog_to_pad(PAD_LUE_041E)
	yield
	set_ailist(CHR_SELF, AILIST_ALERT_WHEN_STOPPED)
	endlist
};

u8 func0414_init_hangar_guard4[] = {
	set_chr_dodge_rating(2, 10)
	set_accuracy(8)
	set_reaction_speed(30)
	set_chr_maxdamage(CHR_SELF, 40)
	add_health_or_armor(10)
	set_recovery_speed(35)
	set_shield(0)
	set_self_flag_bankx(CHRFLAG1_NOIDLEANIMS, BANK_1)
	set_squadron(SQUADRON_0B)
	set_self_chrflag(CHRCFLAG_NOFRIENDLYFIRE)
	set_chr_id(0x2f)
	set_self_flag_bankx(CHRFLAG0_CAMP, BANK_0)
	set_self_flag_bankx(CHRFLAG0_SKIPSAFETYCHECKS, BANK_0)
	try_equip_weapon(MODEL_CHRDRAGON, WEAPON_DRAGON, 0x00000000, /*goto*/ 0x06)
	label(0x06)
	jog_to_pad(PAD_LUE_041D)
	yield
#if VERSION >= VERSION_NTSC_1_0
	set_target_chr(CHR_BOND)
#endif
	set_ailist(CHR_SELF, AILIST_ALERT_WHEN_STOPPED)
	endlist
};

u8 func0415_alert_when_stopped[] = {
	// @bug: This loop should have a check for seeing Jo or a distance check to
	// Jo. Without it, the guards will run past Jo at the end if she's already
	// at the door.
	beginloop(0x04)
		if_chr_stopped(/*goto*/ 0x06)
	endloop(0x04)

	label(0x06)
	set_ailist(CHR_SELF, GAILIST_ALERTED)
	endlist
};

/**
 * This is NOT assigned to Jon.
 */
u8 func0417_traitor[] = {
	set_self_chrflag(CHRCFLAG_NOFRIENDLYFIRE)
	set_self_flag_bankx(CHRFLAG1_PREWARNED, BANK_1)
	set_accuracy(100)
	set_reaction_speed(100)
	restart_timer
	try_equip_weapon(MODEL_CHRDY357, WEAPON_DY357MAGNUM, 0x00000000, /*goto*/ 0x03)

	beginloop(0x03)
		if_timer_gt(300, /*goto*/ 0x09)
	endloop(0x03)

	label(0x09)
		open_door(0x11)
		if_chr_dead(0x2f, /*goto*/ 0x0d)
		if_chr_knockedout(0x2f, /*goto*/ 0x0d)
		set_target_chr(0x2f)
		goto_next(0x2e)

		label(0x0d)
		if_chr_dead(0x2e, /*goto*/ 0x0e)
		if_chr_knockedout(0x2e, /*goto*/ 0x0e)
		set_target_chr(0x2e)
		goto_next(0x2e)

		label(0x0e)
		if_chr_dead(0x2d, /*goto*/ 0x0f)
		if_chr_knockedout(0x2d, /*goto*/ 0x0f)
		set_target_chr(0x2d)
		goto_next(0x2e)

		label(0x0f)
		if_chr_dead(0x2c, /*goto*/ 0x10)
		if_chr_knockedout(0x2c, /*goto*/ 0x10)
		set_target_chr(0x2c)

		label(0x2e)
		call_rng
		if_rand_gt(128, /*goto*/ 0x2e)
		try_attack_kneel(ATTACKFLAG_AIMATTARGET | ATTACKFLAG_AIMONLY, 0, /*goto*/ 0x0a)

		label(0x2e)
		try_attack_stand(ATTACKFLAG_AIMATTARGET | ATTACKFLAG_AIMONLY, 0, /*goto*/ 0x0a)
		dprint 'S','H','O','O','T','F','A','I','L','E','D','\n',0,
		yield
		label(0x0a)
		try_modify_attack(ATTACKFLAG_AIMATTARGET, 0, /*goto*/ 0x0b)
		goto_next(0x0c)

		beginloop(0x0b)
			chr_toggle_p1p2(CHR_SELF)
			if_chr_y(CHR_P1P2, -1373, OPERATOR_LESS_THAN, /*goto*/ 0x10)
			chr_toggle_p1p2(CHR_SELF)
			if_chr_y(CHR_P1P2, -1373, OPERATOR_LESS_THAN, /*goto*/ 0x10)
			if_chr_stopped(/*goto*/ 0x0c)
		endloop(0x0b)

		label(0x0c)
		if_chr_death_animation_finished(0x2f, /*goto*/ 0x2e)
		chr_damage_chr(CHR_SELF, 0x2f, HITPART_HEAD)
		goto_next(0x06)

		label(0x2e)
		if_chr_death_animation_finished(0x2e, /*goto*/ 0x2e)
		chr_damage_chr(CHR_SELF, 0x2e, HITPART_HEAD)
		goto_next(0x06)

		label(0x2e)
		if_chr_death_animation_finished(0x2d, /*goto*/ 0x2e)
		chr_damage_chr(CHR_SELF, 0x2d, HITPART_HEAD)
		goto_next(0x06)

		label(0x2e)
		if_chr_death_animation_finished(0x2c, /*goto*/ 0x06)
		chr_damage_chr(CHR_SELF, 0x2c, HITPART_HEAD)
		label(0x06)
	goto_first(0x09)

	label(0x10)
	set_chr_hiddenflag(CHR_SELF, CHRHFLAG_WARPONSCREEN)
	run_to_pad(PAD_LUE_0197)

	beginloop(0x60)
		if_chr_stopped(/*goto*/ 0x2e)
	endloop(0x60)

	label(0x2e)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func0416_mechanic[] = {
	set_shotlist(AILIST_MECHANIC)
	if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2e)
	if_chr_dead(CHR_SELF, /*goto*/ 0x2e)
	if_chr_knockedout(CHR_SELF, /*goto*/ 0x2e)
	goto_next(0x06)

	label(0x2e)
	set_shotlist(GAILIST_IDLE)
	set_ailist(CHR_SELF, GAILIST_IDLE)

	label(0x06)
	if_just_injured(CHR_SELF, /*goto*/ 0x2e)
	if_alertness(99, OPERATOR_GREATER_THAN, /*goto*/ 0x0f)
	goto_next(0x04)

	label(0x2e)
	set_chr_team(CHR_SELF, TEAM_ENEMY)
	rebuild_teams
	rebuild_squadrons

	beginloop(0x6a)
		if_chr_stopped(/*goto*/ 0x2e)
	endloop(0x6a)

	// Not alert - at interceptor
	label(0x04)
		call_rng
		chr_do_animation(ANIM_STANDING_TYPE_ONE_HAND, 0, 193, CHRANIMFLAG_SLOWUPDATE, 16, CHR_SELF, 2)

		beginloop(0x09)
			chr_toggle_p1p2(CHR_SELF)
			set_target_chr(CHR_P1P2)
			if_stage_flag_eq(STAGEFLAG_TRIGGER_INTERCEPTOR, TRUE, /*goto*/ 0x2f)
			if_just_injured(CHR_SELF, /*goto*/ 0x2e)
			if_can_see_target(/*goto*/ 0x2e)
			if_chr_stopped(/*goto*/ 0x06)
		endloop(0x09)

		label(0x06)
	goto_first(0x04)

	label(0x2f)
	jog_to_pad(PAD_LUE_0385)

	beginloop(0x0c)
		if_chr_stopped(/*goto*/ 0x0e)
	endloop(0x0c)

	// In bunker
	label(0x0e)
		chr_do_animation(ANIM_STANDING_TYPE_ONE_HAND, 0, 193, CHRANIMFLAG_SLOWUPDATE, 16, CHR_SELF, 2)

		beginloop(0x0d)
			chr_toggle_p1p2(CHR_SELF)
			set_target_chr(CHR_P1P2)
			if_heard_target_recently(/*goto*/ 0x2e)
			if_can_see_target(/*goto*/ 0x2e)
			if_chr_stopped(/*goto*/ 0x06)
		endloop(0x0d)

		label(0x06)
	goto_first(0x0e)

	label(0x2e)
	set_alertness(100)
	restart_timer
	try_face_entity(ATTACKFLAG_AIMATTARGET, 0, /*goto*/ 0x0a)

	beginloop(0x0a)
		if_target_in_fov_left(10, /*goto*/ 0x06)
		if_timer_gt(30, /*goto*/ 0x06)
	endloop(0x0a)

	label(0x0f)
	set_chr_team(CHR_SELF, TEAM_ENEMY)
	rebuild_teams
	rebuild_squadrons
#if VERSION >= VERSION_NTSC_1_0
	play_sound(SFX_M0_HOLY_SHH, CHANNEL_7)
#else
	play_sound(SFX_80F6, CHANNEL_7)
#endif
	label(0x06)
	set_returnlist(CHR_SELF, GAILIST_ALERTED)
	set_ailist(CHR_SELF, GAILIST_ALERTED)
	endlist
};

u8 func1001_objectives_failed_msg[] = {
	yield
	set_object_flag2(OBJ_MINE1, OBJFLAG2_INVISIBLE)
	set_object_flag2(OBJ_MINE2, OBJFLAG2_INVISIBLE)
	set_object_flag2(OBJ_MINE3, OBJFLAG2_INVISIBLE)
	set_object_flag2(0x1a, OBJFLAG2_INVISIBLE) // invalid object
	set_object_flag2(OBJ_MINE4, OBJFLAG2_INVISIBLE)
	set_object_flag2(OBJ_MINE5, OBJFLAG2_INVISIBLE)
	set_object_flag2(OBJ_MINE6, OBJFLAG2_INVISIBLE)
	set_chr_chrflag(CHR_MECHANIC, CHRCFLAG_KEEPCORPSEKO)
	set_ailist(CHR_SELF, GAILIST_SHOW_OBJ_FAILED_MSG)
	endlist
};

u8 func040a_top_interceptor[] = {
	set_chr_maxdamage(CHR_SELF, 5000)
	set_object_flag(OBJ_INTERCEPTOR3, OBJFLAG_CHOPPER_INACTIVE)
	restart_timer

	beginloop(0x03)
		if_object_in_good_condition(OBJ_INTERCEPTOR3, /*goto*/ 0x2e)
		set_ailist(CHR_SELF, GAILIST_IDLE)
		label(0x2e)
		if_stage_flag_eq(STAGEFLAG_TRIGGER_INTERCEPTOR, TRUE, /*goto*/ 0x06)
	endloop(0x03)

	label(0x06)
	unset_object_flag(OBJ_INTERCEPTOR3, OBJFLAG_CHOPPER_INACTIVE)
	chopper_arm_weapons
	begin_hovercar_path(0x22)
	set_chr_maxdamage(CHR_SELF, 5000)

	beginloop(0x04)
		chr_toggle_p1p2(CHR_SELF)
		set_target_chr(CHR_P1P2)
		if_los_to_target(/*goto*/ 0x59)
	endloop(0x04)

	label(0x58)
	yield
	label(0x09)
	begin_hovercar_path(0x22)

	beginloop(0x0a)
		chr_toggle_p1p2(CHR_SELF)
		set_target_chr(CHR_P1P2)
		label(0x06)
		if_los_to_target(/*goto*/ 0x59)
		reloop(0x0a)

		// Unreachable
		label(0x5a)
		dprint 'C','H','A','N','G','E',' ','T','O',' ','L','O','W','\n',0,
		goto_first(0x09)

		label(0x59)
		try_modify_attack(ATTACKFLAG_AIMATTARGET, 0, /*goto*/ 0x5b)
		reloop(0x0a)

		label(0x5b)
		yield
		if_los_to_target(/*goto*/ 0x5c)
		restart_timer

		beginloop(0x5d)
			if_timer_gt(480, /*goto*/ 0x5e)
			if_los_to_target(/*goto*/ 0x5c)
		endloop(0x5d)

		label(0x5e)
		stop_chr
	endloop(0x0a)

	label(0x5c)
	goto_first(0x5b)

	endlist
};

u8 func040c_init_bottom_interceptors[] = {
	set_chr_maxdamage(CHR_SELF, 5000)
	set_object_flag(OBJ_INTERCEPTOR1, OBJFLAG_CHOPPER_INACTIVE)
	set_object_flag(OBJ_INTERCEPTOR2, OBJFLAG_CHOPPER_INACTIVE)

	beginloop(0x04)
	endloop(0x04)

	endlist
};

u8 func040d_90c8[] = {
	set_self_chrflag(CHRCFLAG_LOSEXTRAHEIGHT)
	set_accuracy(30)
	set_ailist(CHR_SELF, GAILIST_UNALERTED)
	endlist
};

u8 func040e_outro[] = {
	open_door(0x11)
	disable_object(OBJ_HOVERBIKE)
	camera_movement(ANIM_CUT_LUE_OUTRO_CAM)
	play_cutscene_track(MUSIC_INFILTRATION_OUTRO)
	set_chr_chrflag(CHR_ANTI, CHRCFLAG_HIDDEN)
	set_chr_chrflag(CHR_P1P2_OPPOSITE, CHRCFLAG_HIDDEN)
	set_ailist(CHR_P1P2, GAILIST_IDLE)
	set_chr_chrflag(CHR_JONATHAN, CHRCFLAG_INVINCIBLE)
	set_chr_chrflag(CHR_OUTRO_GUARD, CHRCFLAG_INVINCIBLE)

	unset_chr_chrflag(CHR_P1P2, CHRCFLAG_HIDDEN)
	set_chr_chrflag(CHR_P1P2, CHRCFLAG_UNPLAYABLE)
	set_chr_hiddenflag(CHR_P1P2, CHRHFLAG_00020000)
	chr_do_animation(ANIM_CUT_LUE_OUTRO_JO, -1, -1, CHRANIMFLAG_MOVEWHENINVIS | CHRANIMFLAG_PAUSEATEND, 0, CHR_P1P2, 4)
	set_chr_hudpiece_visible(CHR_P1P2, TRUE)

	set_chr_chrflag(CHR_JONATHAN, CHRCFLAG_UNPLAYABLE)
	unset_chr_chrflag(CHR_JONATHAN, CHRCFLAG_HIDDEN)
	set_chr_hiddenflag(CHR_JONATHAN, CHRHFLAG_00020000)
	chr_do_animation(ANIM_CUT_LUE_OUTRO_JON, -1, -1, CHRANIMFLAG_MOVEWHENINVIS | CHRANIMFLAG_PAUSEATEND, 0, CHR_JONATHAN, 4)

	set_chr_chrflag(CHR_OUTRO_GUARD, CHRCFLAG_UNPLAYABLE)
	unset_chr_chrflag(CHR_OUTRO_GUARD, CHRCFLAG_HIDDEN)
	set_chr_hiddenflag(CHR_OUTRO_GUARD, CHRHFLAG_00020000)
	chr_do_animation(ANIM_CUT_LUE_OUTRO_GUARD, -1, -1, CHRANIMFLAG_MOVEWHENINVIS | CHRANIMFLAG_PAUSEATEND, 0, CHR_OUTRO_GUARD, 4)

	restart_timer
	show_nonessential_chrs(FALSE)
	set_cutscene_weapon(CHR_P1P2, -1, -1)
	yield
	set_cutscene_weapon(CHR_P1P2, -1, WEAPON_FALCON2)

	#define wait_until(time, loopid) \
		beginloop(loopid) \
			if_controller_button_pressed(/*goto*/ 0x54) \
			if_timer_gt(time, /*goto*/ 0x06) \
		endloop(loopid) \
		label(0x06)

	wait_until(1, 0x60)
	speak(CHR_P1P2, L_LUE_067, MP3_0421, CHANNEL_5, COLOR_07_RED) // "Agent Dark! Over here!"

	wait_until(46, 0x61)
	play_sound(SFX_0171, CHANNEL_7)

	wait_until(74, 0x62)
	play_sound(SFX_0172, CHANNEL_6)

	wait_until(100, 0x64)
	play_sound(SFX_0173, CHANNEL_7)

	wait_until(150, 0x65)
	speak(CHR_P1P2, L_LUE_068, MP3_0422, CHANNEL_5, COLOR_09_BLUE) // "There you are! I was beginning to wonder if..."

	wait_until(188, 0x66)
	play_sound(SFX_0174, CHANNEL_6)

	wait_until(278, 0x67)
	play_sound(SFX_0175, CHANNEL_7)

	wait_until(290, 0x68)
	set_chr_shooting_in_cutscene(CHR_JONATHAN, TRUE)
	yield
	yield
	set_chr_shooting_in_cutscene(CHR_JONATHAN, FALSE)

	wait_until(296, 0x79)
	play_sound(SFX_HIT_CHR, CHANNEL_CUTSCENE)

	wait_until(310, 0x7a)
	play_sound(SFX_ARGH_MALE_0090, CHANNEL_CUTSCENE)

	wait_until(392, 0x69)
	play_sound(SFX_THUD_808E, CHANNEL_CUTSCENE)

	wait_until(406, 0x6c)
	speak(CHR_P1P2, L_LUE_069, MP3_0423, CHANNEL_5, COLOR_07_RED) // "If what?"

	wait_until(410, 0x6a)
	play_sound(SFX_0176, CHANNEL_6)

	wait_until(424, 0x6b)
	play_sound(SFX_0177, CHANNEL_6)

	wait_until(426, 0x6c)
	play_sound(SFX_0177, CHANNEL_7)

	wait_until(464, 0x6d)
	play_sound(SFX_007D, CHANNEL_CUTSCENE)

	wait_until(472, 0x6e)
	speak(CHR_P1P2, L_LUE_070, MP3_0424, CHANNEL_5, COLOR_09_BLUE) // "If you'd been discovered yet. And frankly, if this..."

	wait_until(900, 0x70)
	speak(CHR_P1P2, L_LUE_071, MP3_0425, CHANNEL_5, COLOR_07_RED) // "I was tidying up one of your loose ends."

	wait_until(936, 0x6f)
	play_sound(SFX_0178, CHANNEL_7)

	wait_until(1080, 0x71)
	speak(CHR_P1P2, L_LUE_072, MP3_0426, CHANNEL_5, COLOR_09_BLUE) // "My loose ends?"

	wait_until(1180, 0x72)
	speak(CHR_P1P2, L_LUE_073, MP3_0427, CHANNEL_5, COLOR_07_RED) // "I'm sorry, I didn't realize you wanted him to shoo..."

	wait_until(1228, 0x73)
	play_sound(SFX_0171, CHANNEL_7)

	wait_until(1286, 0x74)
	play_sound(SFX_0172, CHANNEL_7)

	wait_until(1434, 0x75)
	play_sound(SFX_0173, CHANNEL_7)

	wait_until(1462, 0x77)
	play_sound(SFX_0174, CHANNEL_6)

	wait_until(1585, 0x76)
	speak(CHR_P1P2, L_LUE_074, MP3_0428, CHANNEL_5, COLOR_09_BLUE) // "Okay, okay, forget about it. I'm going to let the ..."

	wait_until(1588, 0x78)
	play_sound(SFX_0175, CHANNEL_7)

	beginloop(0x09)
		if_camera_animating(/*goto*/ 0x2e)
		goto_next(0x54)

		label(0x2e)
		if_controller_button_pressed(/*goto*/ 0x54)
		label(0x2e)
	endloop(0x09)

	label(0x54)
	label(0x06)
	remove_chr(CHR_OUTRO_GUARD)
	set_chr_hudpiece_visible(CHR_P1P2, FALSE)
	end_level
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func0410_intro[] = {
	set_chr_chrflag(CHR_COOP, CHRCFLAG_HIDDEN)
	set_chr_chrflag(CHR_ANTI, CHRCFLAG_HIDDEN)
	if_controller_button_pressed(/*goto*/ 0x54)
	play_cutscene_track(MUSIC_INFILTRATION_INTRO)
	camera_movement(ANIM_CUT_LUE_INTRO_CAM_01)
	set_chr_chrflag(0x0c, CHRCFLAG_HIDDEN)
	set_chr_chrflag(0x0d, CHRCFLAG_HIDDEN)
	set_chr_chrflag(0x32, CHRCFLAG_UNPLAYABLE)
	unset_chr_chrflag(0x32, CHRCFLAG_HIDDEN)
	set_chr_hiddenflag(0x32, CHRHFLAG_00020000)
	chr_do_animation(ANIM_CUT_LUE_INTRO_GUARD, -1, -1, CHRANIMFLAG_MOVEWHENINVIS | CHRANIMFLAG_PAUSEATEND, 0, 0x32, 4)
	set_chr_chrflag(CHR_BOND, CHRCFLAG_HIDDEN)
	restart_timer
	fade_to_color(0x000000ff, 0)
	fade_to_color(0x00000000, 90)
	set_cutscene_weapon(CHR_BOND, WEAPON_NONE, WEAPON_NONE)
	yield
	set_cutscene_weapon(CHR_BOND, WEAPON_FALCON2, WEAPON_NONE)

	wait_until(26, 0x60)
	speak(CHR_BOND, L_LUE_058, MP3_0418, CHANNEL_7, COLOR_06_WHITE) // "Okay, Joanna, take a look at this. Our operative i..."

	wait_until(500, 0x61)
	speak(CHR_BOND, L_LUE_059, MP3_0419, CHANNEL_7, COLOR_06_WHITE) // "This is your entry point... A deserted helipad on ..."

	wait_until(800, 0x62)
	speak(CHR_BOND, L_LUE_060, MP3_041A, CHANNEL_7, COLOR_06_WHITE) // "The lift down to the hangars and the rendezvous po..."

	wait_until(1200, 0x63)

	wait_until(1236, 0x64)
	speak(CHR_BOND, L_LUE_061, MP3_041B, CHANNEL_7, COLOR_06_WHITE) // "Here is the communications antenna. Attach a comms..."

	beginloop(0x09)
		if_camera_animating(/*goto*/ 0x2e)
		goto_next(0x06)

		label(0x2e)
		if_controller_button_pressed(/*goto*/ 0x06)
		label(0x2e)
	endloop(0x09)

	label(0x06)
	label(0x55)
	unset_chr_chrflag(0x32, CHRCFLAG_UNPLAYABLE)
	unset_chr_chrflag(CHR_BOND, CHRCFLAG_HIDDEN)
	label(0x54)
	if_controller_button_pressed(/*goto*/ 0x54)
	camera_movement(ANIM_CUT_LUE_INTRO_CAM_02)
	set_chr_chrflag(CHR_BOND, CHRCFLAG_HIDDEN)

	set_chr_chrflag(0x29, CHRCFLAG_UNPLAYABLE)
	unset_chr_chrflag(0x29, CHRCFLAG_HIDDEN)
	set_chr_hiddenflag(0x29, CHRHFLAG_00020000)
	chr_do_animation(ANIM_CUT_LUE_INTRO_LAB_01, -1, -1, CHRANIMFLAG_MOVEWHENINVIS | CHRANIMFLAG_PAUSEATEND, 0, 0x29, 4)

	set_chr_chrflag(0x2a, CHRCFLAG_UNPLAYABLE)
	unset_chr_chrflag(0x2a, CHRCFLAG_HIDDEN)
	set_chr_hiddenflag(0x2a, CHRHFLAG_00020000)
	chr_do_animation(ANIM_CUT_LUE_INTRO_BIO1_01, -1, -1, CHRANIMFLAG_MOVEWHENINVIS | CHRANIMFLAG_PAUSEATEND, 0, 0x2a, 4)

	set_chr_chrflag(0x2b, CHRCFLAG_UNPLAYABLE)
	unset_chr_chrflag(0x2b, CHRCFLAG_HIDDEN)
	set_chr_hiddenflag(0x2b, CHRHFLAG_00020000)
	chr_do_animation(ANIM_CUT_LUE_INTRO_BIO2_01, -1, -1, CHRANIMFLAG_MOVEWHENINVIS | CHRANIMFLAG_PAUSEATEND, 0, 0x2b, 4)

	set_object_flag2(0x2f, OBJFLAG2_CANFILLVIEWPORT)
	set_object_flag3(0x2f, OBJFLAG3_00000010)
	object_do_animation(ANIM_CUT_LUE_INTRO_BED_01, 0x2f, 0x04, 0xffff)
	restart_timer

	wait_until(186, 0x65)
	speak(CHR_BOND, L_LUE_062, SFX_81B9, CHANNEL_7, COLOR_09_BLUE) // "Oh, my God!"

	wait_until(380, 0x66)
	speak(CHR_BOND, L_LUE_063, MP3_041D, CHANNEL_7, COLOR_06_WHITE) // "Here is our friend. He appears to be physically un..."

	beginloop(0x0a)
		if_camera_animating(/*goto*/ 0x2e)
		goto_next(0x06)

		label(0x2e)
		if_controller_button_pressed(/*goto*/ 0x06)
		label(0x2e)
	endloop(0x0a)

	label(0x06)
	unset_chr_chrflag(CHR_BOND, CHRCFLAG_HIDDEN)
	unset_chr_chrflag(0x29, CHRCFLAG_UNPLAYABLE)
	unset_chr_chrflag(0x2a, CHRCFLAG_UNPLAYABLE)
	unset_chr_chrflag(0x2b, CHRCFLAG_UNPLAYABLE)
	unset_object_flag2(0x2f, OBJFLAG2_CANFILLVIEWPORT)
	label(0x54)
	if_controller_button_pressed(/*goto*/ 0x54)
	camera_movement(ANIM_CUT_LUE_INTRO_CAM_03)
	set_chr_chrflag(CHR_BOND, CHRCFLAG_HIDDEN)

	set_chr_chrflag(0x2a, CHRCFLAG_UNPLAYABLE)
	unset_chr_chrflag(0x2a, CHRCFLAG_HIDDEN)
	set_chr_hiddenflag(0x2a, CHRHFLAG_00020000)
	chr_do_animation(ANIM_CUT_LUE_INTRO_BIO1_02, -1, -1, CHRANIMFLAG_MOVEWHENINVIS | CHRANIMFLAG_PAUSEATEND, 0, 0x2a, 4)

	set_chr_chrflag(0x2b, CHRCFLAG_UNPLAYABLE)
	unset_chr_chrflag(0x2b, CHRCFLAG_HIDDEN)
	set_chr_hiddenflag(0x2b, CHRHFLAG_00020000)
	chr_do_animation(ANIM_CUT_LUE_INTRO_BIO2_02, -1, -1, CHRANIMFLAG_MOVEWHENINVIS | CHRANIMFLAG_PAUSEATEND, 0, 0x2b, 4)

	set_object_flag2(0x2f, OBJFLAG2_CANFILLVIEWPORT)
	set_object_flag3(0x2f, OBJFLAG3_00000010)
	object_do_animation(ANIM_CUT_LUE_INTRO_BED_02, 0x2f, 0x04, 0xffff)
	restart_timer

	wait_until(416, 0x67)
	speak(CHR_BOND, L_LUE_064, MP3_041E, CHANNEL_7, COLOR_09_BLUE) // "But who was...?"

	wait_until(485, 0x68)
	speak(CHR_BOND, L_LUE_065, MP3_041F, CHANNEL_7, COLOR_06_WHITE) // "Any questions? No. Good. Away you go to the hangar..."

	beginloop(0x0b)
		if_camera_animating(/*goto*/ 0x2e)
		goto_next(0x06)

		label(0x2e)
		if_controller_button_pressed(/*goto*/ 0x06)
		label(0x2e)
	endloop(0x0b)

	label(0x06)
	unset_chr_chrflag(CHR_BOND, CHRCFLAG_HIDDEN)
	unset_chr_chrflag(0x2a, CHRCFLAG_UNPLAYABLE)
	unset_chr_chrflag(0x2b, CHRCFLAG_UNPLAYABLE)
	unset_object_flag2(0x2f, OBJFLAG2_CANFILLVIEWPORT)
	label(0x54)
	camera_movement(ANIM_CUT_LUE_INTRO_CAM_04)
	cmd0175(60)
	if_controller_button_pressed(/*goto*/ 0x54)
	set_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE)
	set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000)
	chr_do_animation(ANIM_CUT_LUE_INTRO_JO, -1, -1, CHRANIMFLAG_MOVEWHENINVIS | CHRANIMFLAG_PAUSEATEND, 0, CHR_BOND, 4)
	set_chr_chrflag(0x03, CHRCFLAG_UNPLAYABLE)
	set_chr_hiddenflag(0x03, CHRHFLAG_00020000)
	unset_chr_chrflag(0x03, CHRCFLAG_HIDDEN)
	restart_timer

	wait_until(1, 0x69)
	speak(CHR_BOND, L_LUE_066, MP3_0420, CHANNEL_CUTSCENE, COLOR_09_BLUE) // "Agent Dark Mission Log, 1028 hours. Against my bet..."

	wait_until(340, 0x6a)
	play_sound(SFX_FOOTSTEP_80D5, CHANNEL_CUTSCENE)

	wait_until(364, 0x6b)
	play_sound(SFX_04B0, CHANNEL_CUTSCENE)

	wait_until(458, 0x6c)
	play_sound(SFX_046E, CHANNEL_CUTSCENE)

	play_sound(SFX_FOOTSTEP_80D5, CHANNEL_CUTSCENE)
	wait_until(496, 0x6d)
	play_sound(SFX_FOOTSTEP_80CC, CHANNEL_CUTSCENE)

	play_sound(SFX_FOOTSTEP_80CD, CHANNEL_CUTSCENE)
	wait_until(638, 0x6e)

	wait_until(688, 0x6f)
	play_sound(SFX_JO_LANDING_046F, CHANNEL_CUTSCENE)
	play_sound(SFX_FOOTSTEP_80CE, CHANNEL_CUTSCENE)
	play_sound(SFX_FOOTSTEP_80CF, CHANNEL_CUTSCENE)

	wait_until(750, 0x70)
	play_sound(SFX_016A, CHANNEL_CUTSCENE)

	wait_until(815, 0x71)
	play_sound(SFX_016B, CHANNEL_CUTSCENE)

	wait_until(844, 0x72)
	play_sound(SFX_016C, CHANNEL_CUTSCENE)

	wait_until(908, 0x73)
	play_sound(SFX_0169, CHANNEL_CUTSCENE)

	wait_until(916, 0x74)

	beginloop(0x0c)
		if_camera_animating(/*goto*/ 0x2e)
		goto_next(0x54)

		label(0x2e)
		if_controller_button_pressed(/*goto*/ 0x54)
		label(0x2e)
	endloop(0x0c)

	label(0x54)
	mute_channel(CHANNEL_CUTSCENE)
	mute_channel(CHANNEL_7)
	unset_chr_chrflag(CHR_COOP, CHRCFLAG_HIDDEN)
	unset_chr_chrflag(CHR_ANTI, CHRCFLAG_HIDDEN)
	unset_chr_chrflag(0x0c, CHRCFLAG_HIDDEN)
	unset_chr_chrflag(0x0d, CHRCFLAG_HIDDEN)
	remove_chr(0x32)
	remove_chr(0x29)
	remove_chr(0x2a)
	remove_chr(0x2b)
	disable_object(0x2f)
	unset_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE)
	unset_chr_chrflag(CHR_BOND, CHRCFLAG_HIDDEN)
	set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000)
	chr_do_animation(ANIM_CUT_LUE_INTRO_JO, -2, -1, CHRANIMFLAG_MOVEWHENINVIS | CHRANIMFLAG_PAUSEATEND, 0, CHR_BOND, 2)
	unset_chr_chrflag(0x03, CHRCFLAG_UNPLAYABLE)
	set_ailist(0x02, 0x0426)
	set_ailist(0x03, 0x0426)
	unset_object_flag2(OBJ_INTERCEPTOR1, OBJFLAG2_INVISIBLE)
	unset_object_flag2(OBJ_INTERCEPTOR2, OBJFLAG2_INVISIBLE)
	unset_object_flag2(OBJ_INTERCEPTOR3, OBJFLAG2_INVISIBLE)
	stop_cutscene_track
	stop_ambient_track
	enter_firstperson
	set_stage_flag(STAGEFLAG_INTRO_FINISHED)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

/**
 * This pad is right next to where you start. Most likely the guard was changed
 * to use a path instead, but this function remained.
 *
 * @unused
 */
u8 func0418_walk_to_pad[] = {
	walk_to_pad(PAD_LUE_0019)
	beginloop(0x09)
	endloop(0x09)

	endlist
};

u8 func1010_bunker_lighting[] = {
	yield
	set_chr_team(CHR_ANTI, TEAM_ENEMY)
	restart_timer

	beginloop(0x09)
		if_stage_flag_eq(STAGEFLAG_EXPLOSIVES_PLACED, TRUE, /*goto*/ 0x06)
		if_stage_flag_eq(STAGEFLAG_ANY_LASER_DESTROYED, TRUE, /*goto*/ 0x06)
	endloop(0x09)

	label(0x06)
	mute_channel(CHANNEL_0)
	yield
	assign_sound(SFX_ALARM_INFILTRATION, CHANNEL_0)
	play_repeating_sound_from_object(CHANNEL_0, 0x10, 1, 800, 1100)
	set_lights_state(0x0009, LIGHTOP_TRANSITION, 255, 50, 120)
	if_difficulty_lt(DIFF_SA, /*goto*/ 0x0e)
	restart_timer

	beginloop(0x0a)
		if_timer_gt(30, /*goto*/ 0x2e)
	endloop(0x0a)

	label(0x2e)

	beginloop(0x0b)
		if_timer_gt(40, /*goto*/ 0x2e)
	endloop(0x0b)

	label(0x2e)
	label(0x0e)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func1012_bunker_laser1[] = {
	if_difficulty_gt(DIFF_A, /*goto*/ 0x2e)
	set_ailist(CHR_SELF, GAILIST_IDLE)

	// SA and PA only
	label(0x2e)
	restart_timer

	beginloop(0x09)
		if_stage_flag_eq(STAGEFLAG_EXPLOSIVES_PLACED, TRUE, /*goto*/ 0x0a)
		if_stage_flag_eq(STAGEFLAG_ANY_LASER_DESTROYED, TRUE, /*goto*/ 0x0a)
	endloop(0x09)

	label(0x0a)
		restart_timer
		close_door(0x1e)

		beginloop(0x0b)
			if_stage_flag_eq(STAGEFLAG_RADAR_SHUT_DOWN, TRUE, /*goto*/ 0x10)
			if_timer_gt(180, /*goto*/ 0x06)
		endloop(0x0b)

		label(0x06)
		restart_timer
		open_door(0x1e)

		beginloop(0x0c)
			if_stage_flag_eq(STAGEFLAG_RADAR_SHUT_DOWN, TRUE, /*goto*/ 0x10)
			if_timer_gt(180, /*goto*/ 0x06)
		endloop(0x0c)

		label(0x06)
	goto_first(0x0a)

	label(0x10)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func1013_bunker_lasers234[] = {
	if_difficulty_gt(DIFF_A, /*goto*/ 0x2e)
	set_ailist(CHR_SELF, GAILIST_IDLE)

	label(0x2e)
	restart_timer

	beginloop(0x09)
		if_stage_flag_eq(STAGEFLAG_EXPLOSIVES_PLACED, TRUE, /*goto*/ 0x0a)
		if_stage_flag_eq(STAGEFLAG_ANY_LASER_DESTROYED, TRUE, /*goto*/ 0x0a)
	endloop(0x09)

	label(0x0a)
		restart_timer
		close_door(0x1f)
		close_door(0x20)
		close_door(0x21)

		beginloop(0x0b)
			if_stage_flag_eq(STAGEFLAG_RADAR_SHUT_DOWN, TRUE, /*goto*/ 0x10)
			if_timer_gt(120, /*goto*/ 0x06)
		endloop(0x0b)

		label(0x06)
		restart_timer
		open_door(0x1f)
		open_door(0x20)
		open_door(0x21)

		beginloop(0x0c)
			if_stage_flag_eq(STAGEFLAG_RADAR_SHUT_DOWN, TRUE, /*goto*/ 0x10)
			if_timer_gt(120, /*goto*/ 0x06)
		endloop(0x0c)

		label(0x06)
	goto_first(0x0a)

	label(0x10)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func1013_bunker_lasers56[] = {
	if_difficulty_gt(DIFF_A, /*goto*/ 0x2e)
	set_ailist(CHR_SELF, GAILIST_IDLE)

	label(0x2e)
	restart_timer

	beginloop(0x09)
		if_stage_flag_eq(STAGEFLAG_EXPLOSIVES_PLACED, TRUE, /*goto*/ 0x0a)
		if_stage_flag_eq(STAGEFLAG_ANY_LASER_DESTROYED, TRUE, /*goto*/ 0x0a)
	endloop(0x09)

	label(0x0a)
		restart_timer
		close_door(0x22)

		beginloop(0x0b)
			if_stage_flag_eq(STAGEFLAG_RADAR_SHUT_DOWN, TRUE, /*goto*/ 0x10)
			if_timer_gt(60, /*goto*/ 0x06)
		endloop(0x0b)

		label(0x06)
		restart_timer
		open_door(0x22)
		close_door(0x23)

		beginloop(0x0c)
			if_stage_flag_eq(STAGEFLAG_RADAR_SHUT_DOWN, TRUE, /*goto*/ 0x10)
			if_timer_gt(60, /*goto*/ 0x06)
		endloop(0x0c)

		label(0x06)
		label(0x06)
		restart_timer
		open_door(0x23)
		close_door(0x24)

		beginloop(0x0d)
			if_stage_flag_eq(STAGEFLAG_RADAR_SHUT_DOWN, TRUE, /*goto*/ 0x10)
			if_timer_gt(60, /*goto*/ 0x06)
		endloop(0x0d)

		label(0x06)
		label(0x06)
		restart_timer
		open_door(0x24)

		beginloop(0x0e)
			if_stage_flag_eq(STAGEFLAG_RADAR_SHUT_DOWN, TRUE, /*goto*/ 0x10)
			if_timer_gt(60, /*goto*/ 0x06)
		endloop(0x0e)

		label(0x06)
	goto_first(0x0a)

	label(0x10)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func1013_bunker_lasers[] = {
	if_difficulty_gt(DIFF_A, /*goto*/ 0x03)

	// Agent - hide lasers
	disable_object(0x1e)
	disable_object(0x1f)
	disable_object(0x20)
	disable_object(0x21)
	disable_object(0x22)
	disable_object(0x23)
	disable_object(0x24)
	set_ailist(CHR_SELF, GAILIST_IDLE)

	// SA and PA
	label(0x03)
		set_object_flag(0x1e, OBJFLAG_DOOR_KEEPOPEN)
		set_object_flag(0x1f, OBJFLAG_DOOR_KEEPOPEN)
		set_object_flag(0x20, OBJFLAG_DOOR_KEEPOPEN)
		set_object_flag(0x21, OBJFLAG_DOOR_KEEPOPEN)
		set_object_flag(0x22, OBJFLAG_DOOR_KEEPOPEN)
		set_object_flag(0x23, OBJFLAG_DOOR_KEEPOPEN)
		set_object_flag(0x24, OBJFLAG_DOOR_KEEPOPEN)
		open_door(0x1e)
		open_door(0x1f)
		open_door(0x20)
		open_door(0x21)
		open_door(0x22)
		open_door(0x23)
		open_door(0x24)
		set_object_flag(0x1e, OBJFLAG_DOOR_KEEPOPEN)
		set_object_flag(0x1f, OBJFLAG_DOOR_KEEPOPEN)
		set_object_flag(0x20, OBJFLAG_DOOR_KEEPOPEN)
		set_object_flag(0x21, OBJFLAG_DOOR_KEEPOPEN)
		set_object_flag(0x22, OBJFLAG_DOOR_KEEPOPEN)
		set_object_flag(0x23, OBJFLAG_DOOR_KEEPOPEN)
		set_object_flag(0x24, OBJFLAG_DOOR_KEEPOPEN)

		beginloop(0x04)
			if_stage_flag_eq(STAGEFLAG_EXPLOSIVES_PLACED, TRUE, /*goto*/ 0x09)
			if_stage_flag_eq(STAGEFLAG_ANY_LASER_DESTROYED, TRUE, /*goto*/ 0x09)
			if_door_state(0x1e, (DOORSTATE_CLOSED | DOORSTATE_CLOSING), /*goto*/ 0x06)
		endloop(0x04)

		label(0x06)
	goto_first(0x03)

	beginloop(0x09)
		if_stage_flag_eq(STAGEFLAG_RADAR_SHUT_DOWN, TRUE, /*goto*/ 0x2e)
	endloop(0x09)

	label(0x2e)
	open_door(0x1e)
	open_door(0x1f)
	open_door(0x20)
	open_door(0x21)
	open_door(0x22)
	open_door(0x23)
	open_door(0x24)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func1011_bunker_explosives[] = {
	beginloop(0x04)
		chr_toggle_p1p2(CHR_SELF)
		if_chr_activated_object(CHR_P1P2, OBJ_RADAR_TERMINAL, /*goto*/ 0x2e)
		reloop(0x04)

		label(0x2e)
		if_chr_weapon_equipped(CHR_P1P2, WEAPON_EXPLOSIVES, /*goto*/ 0x2e)
		show_hudmsg(CHR_P1P2, L_LUE_045) // "Access denied."
	goto_first(0x04)

	label(0x2e)
	unset_object_flag2(OBJ_EXPLOSIVE_BRICK, OBJFLAG2_INVISIBLE)
	show_hudmsg(CHR_P1P2, L_LUE_046) // "Explosive has been placed."
	remove_weapon_from_inventory(WEAPON_EXPLOSIVES)
	set_stage_flag(STAGEFLAG_EXPLOSIVES_PLACED)
	restart_timer

	beginloop(0x0a)
		if_timer_gt(180, /*goto*/ 0x06)
	endloop(0x0a)

	label(0x06)
	yield
	set_countdown_timer(20)
	if_difficulty_lt(DIFF_SA, /*goto*/ 0x2e)
	if_stage_flag_eq(STAGEFLAG_ANY_LASER_DESTROYED, TRUE, /*goto*/ 0x06)
	show_hudmsg(CHR_P1P2, L_LUE_047) // "Intruder detected - security system online."
	goto_next(0x06)

	// Agent
	label(0x2e)
	show_hudmsg(CHR_P1P2, L_LUE_075) // "Foreign object detected - security alerted."
	label(0x06)
	play_x_track(XREASON_DEFAULT, 10, 20)
	yield
	show_countdown_timer
	start_countdown_timer

	beginloop(0x09)
		if_countdown_timer_lt(1, /*goto*/ 0x06)
	endloop(0x09)

	label(0x06)
	hide_countdown_timer
	unset_object_flag(OBJ_RADAR_TERMINAL, OBJFLAG_INVINCIBLE)
	yield
	move_object_to_pad(0x25, PAD_LUE_036B)
	disable_object(OBJ_EXPLOSIVE_BRICK)
	unset_object_flag(0x25, OBJFLAG_INVINCIBLE)
	destroy_object(0x25)
	destroy_object(OBJ_RADAR_TERMINAL)
	mute_channel(CHANNEL_0)
	assign_sound(SFX_0479, CHANNEL_0)
	set_object_sound_playing(CHANNEL_0, OBJ_RADAR_TERMINAL, TRUE)
	restart_timer

	beginloop(0x0b)
		if_timer_gt(60, /*goto*/ 0x06)
	endloop(0x0b)

	label(0x06)
	move_object_to_pad(0x26, PAD_LUE_0375)
	unset_object_flag(0x26, OBJFLAG_INVINCIBLE)
	destroy_object(0x26)
	move_object_to_pad(0x27, PAD_LUE_0376)
	unset_object_flag(0x27, OBJFLAG_INVINCIBLE)
	destroy_object(0x27)
	move_object_to_pad(0x28, PAD_LUE_0372)
	unset_object_flag(0x28, OBJFLAG_INVINCIBLE)
	destroy_object(0x28)
	yield
	restart_timer

	beginloop(0x0c)
		if_timer_gt(90, /*goto*/ 0x06)
	endloop(0x0c)

	label(0x06)
	unset_object_flag(0x51, OBJFLAG_INVINCIBLE)
	destroy_object(0x51)
	restart_timer

	beginloop(0x7b)
		if_timer_gt(90, /*goto*/ 0x06)
	endloop(0x7b)

	label(0x06)
	unset_object_flag(0x2d, OBJFLAG_INVINCIBLE)
	move_object_to_pad(0x2d, PAD_LUE_0379)
	destroy_object(0x2d)
	restart_timer

	beginloop(0x11)
		if_timer_gt(90, /*goto*/ 0x06)
	endloop(0x11)

	label(0x06)
	label(0x06)
	unset_object_flag(0x29, OBJFLAG_INVINCIBLE)
	move_object_to_pad(0x29, PAD_LUE_0373)
	destroy_object(0x29)
	restart_timer

	beginloop(0x0d)
		if_timer_gt(90, /*goto*/ 0x06)
	endloop(0x0d)

	label(0x06)
	unset_object_flag(0x2a, OBJFLAG_INVINCIBLE)
	move_object_to_pad(0x2a, PAD_LUE_0374)
	destroy_object(0x2a)
	restart_timer

	beginloop(0x0e)
		if_timer_gt(90, /*goto*/ 0x06)
	endloop(0x0e)

	label(0x06)
	unset_object_flag(0x2b, OBJFLAG_INVINCIBLE)
	move_object_to_pad(0x2b, PAD_LUE_0377)
	destroy_object(0x2b)
	restart_timer

	beginloop(0x0f)
		if_timer_gt(90, /*goto*/ 0x06)
	endloop(0x0f)

	label(0x06)
	unset_object_flag(0x2c, OBJFLAG_INVINCIBLE)
	move_object_to_pad(0x2c, PAD_LUE_0378)
	destroy_object(0x2c)
	restart_timer

	beginloop(0x10)
		if_timer_gt(90, /*goto*/ 0x06)
	endloop(0x10)

	label(0x06)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func1016_trigger_interceptor[] = {
	restart_timer

	beginloop(0x04)
		if_stage_flag_eq(STAGEFLAG_COMMSBUG_PLACED, TRUE, /*goto*/ 0x2e)
		reloop(0x04)

		label(0x2e)
		if_difficulty_lt(DIFF_SA, /*goto*/ 0x09)
		if_difficulty_lt(DIFF_PA, /*goto*/ 0x0a)

		// PA - 60 seconds
		if_timer_gt(3600, /*goto*/ 0x06)
		goto_first(0x04)

		// Agent - 120 seconds
		label(0x09)
		if_timer_gt(7200, /*goto*/ 0x06)
		reloop(0x04)

		// SA - 90 seconds
		label(0x0a)
		if_timer_gt(5400, /*goto*/ 0x06)
	endloop(0x04)

	label(0x06)
	set_stage_flag(STAGEFLAG_TRIGGER_INTERCEPTOR)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func1017_radar_terminal_noise[] = {
	yield
	assign_sound(SFX_8146, CHANNEL_0)
	play_repeating_sound_from_object(CHANNEL_0, OBJ_RADAR_TERMINAL, 1, 800, 1100)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func1018_unhide_guards[] = {
	set_chr_chrflag(0x35, CHRCFLAG_HIDDEN)
	set_chr_chrflag(0x1f, CHRCFLAG_HIDDEN)
	set_chr_chrflag(0x20, CHRCFLAG_HIDDEN)
	set_chr_chrflag(0x21, CHRCFLAG_HIDDEN)
	set_chr_chrflag(0x22, CHRCFLAG_HIDDEN)
	set_chr_chrflag(0x23, CHRCFLAG_HIDDEN)
	set_chr_chrflag(0x24, CHRCFLAG_HIDDEN)
#if VERSION >= VERSION_NTSC_1_0
	set_chr_chrflag(0x35, CHRCFLAG_INVINCIBLE)
	set_chr_chrflag(0x1f, CHRCFLAG_INVINCIBLE)
	set_chr_chrflag(0x20, CHRCFLAG_INVINCIBLE)
	set_chr_chrflag(0x21, CHRCFLAG_INVINCIBLE)
	set_chr_chrflag(0x22, CHRCFLAG_INVINCIBLE)
	set_chr_chrflag(0x23, CHRCFLAG_INVINCIBLE)
	set_chr_chrflag(0x24, CHRCFLAG_INVINCIBLE)
#endif

	// Agent: wait until guards 0x10 and 0x11 are dead
	// (two guards near antenna blue door)
	// SA and PA: Wait until bug thrown on antenna
	beginloop(0x04)
		if_difficulty_lt(DIFF_SA, /*goto*/ 0x06)
		if_objective_complete(1, /*goto*/ 0x2e)
		reloop(0x04)

		label(0x06)
		if_chr_death_animation_finished(0x10, /*goto*/ 0x06)
		if_chr_dead(0x10, /*goto*/ 0x06)
		if_chr_knockedout(0x10, /*goto*/ 0x06)
		goto_first(0x04)

		label(0x06)
		if_chr_death_animation_finished(0x11, /*goto*/ 0x2e)
		if_chr_dead(0x11, /*goto*/ 0x2e)
		if_chr_knockedout(0x11, /*goto*/ 0x2e)
	endloop(0x04)

	// Enable 4 more guards - the ones inside the blue door
	label(0x2e)
	unset_chr_chrflag(0x1f, CHRCFLAG_HIDDEN)
	unset_chr_chrflag(0x20, CHRCFLAG_HIDDEN)
	unset_chr_chrflag(0x21, CHRCFLAG_HIDDEN)
	unset_chr_chrflag(0x22, CHRCFLAG_HIDDEN)
#if VERSION >= VERSION_NTSC_1_0
	unset_chr_chrflag(0x1f, CHRCFLAG_INVINCIBLE)
	unset_chr_chrflag(0x20, CHRCFLAG_INVINCIBLE)
	unset_chr_chrflag(0x21, CHRCFLAG_INVINCIBLE)
	unset_chr_chrflag(0x22, CHRCFLAG_INVINCIBLE)
#endif
	set_ailist(0x1f, AILIST_TROOPER_ALERTED)
	set_ailist(0x20, AILIST_TROOPER_ALERTED)
	set_ailist(0x21, AILIST_TROOPER_ALERTED)
	set_ailist(0x22, AILIST_TROOPER_ALERTED)

	// Wait until player in room 0x0044 (first hangar ramp)
	beginloop(0x09)
		chr_toggle_p1p2(CHR_SELF)
		if_chr_in_room(CHR_P1P2, 0x00, 0x0044, /*goto*/ 0x2e)
	endloop(0x09)

	// Enable 2 more guards
	label(0x2e)
	unset_chr_chrflag(0x23, CHRCFLAG_HIDDEN)
	unset_chr_chrflag(0x24, CHRCFLAG_HIDDEN)
#if VERSION >= VERSION_NTSC_1_0
	unset_chr_chrflag(0x23, CHRCFLAG_INVINCIBLE)
	unset_chr_chrflag(0x24, CHRCFLAG_INVINCIBLE)
#endif
	set_ailist(0x23, AILIST_DRAGON_ALERTED)
	set_ailist(0x24, AILIST_DRAGON_ALERTED)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func0419_clone_spawner[] = {
	set_chr_dodge_rating(2, 10)
	set_accuracy(8)
	set_reaction_speed(30)
	set_chr_maxdamage(CHR_SELF, 40)
	add_health_or_armor(10)
	set_recovery_speed(35)
	set_shield(0)
	set_self_chrflag(CHRCFLAG_CLONEABLE)
	set_self_chrflag(CHRCFLAG_HIDDEN)
#if VERSION >= VERSION_NTSC_1_0
	set_self_chrflag(CHRCFLAG_INVINCIBLE)
#endif
	set_self_chrflag(CHRCFLAG_NEVERSLEEP)

	beginloop(0x04)
		if_stage_flag_eq(STAGEFLAG_ENTERED_FINAL_HANGAR, TRUE, /*goto*/ 0x2e)
		reloop(0x04)

		label(0x2e)
		dprint 'O','B','J','E','C','T','I','V','E',' ','D','O','N','E','\n',0,
		if_never_been_onscreen(/*goto*/ 0x4f)
		if_los_to_target(/*goto*/ 0x09)
		reloop(0x04)

		label(0x09)
		set_ailist(CHR_SELF, AILIST_ALERTED_SPAWNED_GUARD)

		label(0x4f)
		unset_self_chrflag(CHRCFLAG_HIDDEN)
#if VERSION >= VERSION_NTSC_1_0
		unset_self_chrflag(CHRCFLAG_INVINCIBLE)
#endif
		if_chr_death_animation_finished(CHR_CLONE, /*goto*/ 0x4f)
		reloop(0x04)

		label(0x4f)
		try_spawn_clone2(CHR_SELF, AILIST_INIT_ALERTED_SPAWNED_GUARD, 0, /*goto*/ 0x2e)
		set_ailist(CHR_SELF, AILIST_ALERTED_SPAWNED_GUARD)

		label(0x2e)
		yield
	endloop(0x04)

	endlist
};

u8 func041a_init_alerted_spawned_guard[] = {
	set_self_flag_bankx(CHRFLAG1_NOIDLEANIMS, BANK_1)
	label(0x04)
	rebuild_teams
	rebuild_squadrons
	try_inherit_properties(0x25, /*goto*/ 0x06)
	label(0x06)
	set_ailist(CHR_SELF, AILIST_ALERTED_SPAWNED_GUARD)
	endlist
};

u8 func041b_alerted_spawned_guard[] = {
	set_ailist(CHR_SELF, GAILIST_ALERTED)
	endlist
};

u8 func1019_spawn_guards_at_antenna[] = {
	// Agent: wait until guards 0x10 and 0x11 are dead
	// (two guards near antenna blue door)
	// SA and PA: Wait until bug thrown on antenna
	beginloop(0x04)
		dprint 'C','H','E','C','K',' ','F','O','R',' ','O','B','J','E','C','T','I','V','E','\n',0,
		if_difficulty_lt(DIFF_SA, /*goto*/ 0x06)
		if_objective_complete(1, /*goto*/ 0x2e)
		reloop(0x04)

		label(0x06)
		if_chr_death_animation_finished(0x10, /*goto*/ 0x06)
		if_chr_dead(0x10, /*goto*/ 0x06)
		if_chr_knockedout(0x10, /*goto*/ 0x06)
		reloop(0x04)

		label(0x06)
		if_chr_death_animation_finished(0x11, /*goto*/ 0x2e)
		if_chr_dead(0x11, /*goto*/ 0x2e)
		if_chr_knockedout(0x11, /*goto*/ 0x2e)
	endloop(0x04)

	// Spawn 3 guards
	label(0x2e)
	label(0x06)
	set_morale(3)

	beginloop(0x56)
		dprint 'T','R','Y',' ','C','R','E','A','T','E','\n',0,
		if_morale_lt(1, /*goto*/ 0x06)
		try_spawn_chr_at_pad(BODY_A51TROOPER, HEAD_RANDOM, PAD_LUE_00A0, AILIST_SPAWNED_GUARD, SPAWNFLAG_BASICGUARD, /*goto*/ 0x57)
		reloop(0x56)

		label(0x57)
		yield
		dprint 'C','R','E','A','T','E','\n',0,
		subtract_morale(1)
		restart_timer

		beginloop(0x09)
			if_timer_gt(10, /*goto*/ 0x2e)
		endloop(0x09)

		label(0x2e)
	endloop(0x56)

	label(0x06)
	yield
	yield
	yield
	yield
	yield
	unset_chr_chrflag(0x35, CHRCFLAG_HIDDEN)
#if VERSION >= VERSION_NTSC_1_0
	unset_chr_chrflag(0x35, CHRCFLAG_INVINCIBLE)
#endif
	set_ailist(0x35, GAILIST_SEARCH_FOR_PLAYER)
	rebuild_teams
	rebuild_squadrons
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func040f_spawned_guard[] = {
	try_equip_weapon(MODEL_CHRLEEGUN1, WEAPON_MAGSEC4, 0x00000000, /*goto*/ 0x06)
	label(0x06)
	set_chr_team(CHR_SELF, TEAM_ENEMY)
	set_self_flag_bankx(CHRFLAG0_SKIPSAFETYCHECKS, BANK_0)
	set_self_flag_bankx(CHRFLAG0_HOLD_POSITION, BANK_0)
	set_squadron(SQUADRON_0E)
	set_self_chrflag(CHRCFLAG_RUNFASTER)
	try_inherit_properties(0x35, /*goto*/ 0x06)
	label(0x06)
	restart_timer

	beginloop(0x0a)
		if_timer_gt(300, /*goto*/ 0x2e)
	endloop(0x0a)

	label(0x2e)
	run_to_pad(PAD_LUE_0095) // outside blue door

	beginloop(0x09)
		if_timer_gt(120, /*goto*/ 0x06)
	endloop(0x09)

	label(0x06)
	set_ailist(CHR_SELF, GAILIST_SEARCH_FOR_PLAYER)
	endlist
};

#define init_guard(accuracy, reaction, armor, recovery, function) \
	set_accuracy(accuracy) \
	set_reaction_speed(reaction) \
	set_chr_maxdamage(CHR_SELF, 40) \
	add_health_or_armor(armor) \
	set_recovery_speed(recovery) \
	set_shield(0) \
	set_ailist(CHR_SELF, function)

u8 func041d_trooper_unalerted[] = {
	set_chr_dodge_rating(2, 10)
	init_guard(6, 50, 0, 0, GAILIST_UNALERTED)
	endlist
};

u8 func041f_trooper_alerted[] = {
	set_chr_dodge_rating(2, 10)
	init_guard(6, 50, 0, 0, GAILIST_ALERTED)
	endlist
};

u8 func041e_dragon_unalerted[] = {
	init_guard(8, 30, 10, 35, GAILIST_UNALERTED)
	endlist
};

u8 func0420_dragon_alerted[] = {
	init_guard(8, 30, 10, 35, GAILIST_ALERTED)
	endlist
};

u8 func141f_start_lifts[] = {
	activate_lift(2, 0x31)
	activate_lift(3, 0x32)
	activate_lift(4, 0x33)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func101a_check_mechanic_dead[] = {
	yield
	unset_savefile_flag(GAMEFILEFLAG_RESCUE_MECHANIC_DEAD)

	beginloop(0x04)
		if_chr_dead(CHR_MECHANIC, /*goto*/ 0x2e)
	endloop(0x04)

	label(0x2e)
	set_savefile_flag(GAMEFILEFLAG_RESCUE_MECHANIC_DEAD)
	dprint 'D','E','L','E','T','E',' ','M','E','C','H','\n',0,
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

/**
 * @bug: This message cannot be played because the player has no way to get to
 * room 0x0001, which is above the bunker roof.
 */
u8 func101b_msg_airinterceptradar[] = {
	beginloop(0x04)
		chr_toggle_p1p2(CHR_SELF)
		if_chr_in_room(CHR_P1P2, 0x00, 0x0001, /*goto*/ 0x2e)
	endloop(0x04)

	label(0x2e)
	speak(CHR_P1P2, L_LUE_053, SFX_817D, CHANNEL_6, COLOR_09_BLUE) // "The air intercept radar is controlled from that bu..."
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func101c_msg_cantthrow[] = {
	if_difficulty_lt(DIFF_SA, /*goto*/ 0x0e)
	restart_timer

	beginloop(0x04)
		chr_toggle_p1p2(CHR_SELF)
		if_chr_in_room(CHR_P1P2, 0x00, 0x0013, /*goto*/ 0x2e)
	endloop(0x04)

	label(0x2e)
	speak(CHR_P1P2, L_LUE_054, MP3_03B9, CHANNEL_6, COLOR_09_BLUE) // "There's the antenna, but... I can't throw a bug th..."
	label(0x0e)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

/**
 * This message is also unplayable.
 */
u8 func101d_msg_hangarlift[] = {
	// Wait for radar shut down and player in room 0x0001 (which is impossible)
	beginloop(0x04)
		chr_toggle_p1p2(CHR_SELF)
		if_objective_complete(0, /*goto*/ 0x2e)
		reloop(0x04)

		label(0x2e)
		if_chr_in_room(CHR_P1P2, 0x00, 0x0001, /*goto*/ 0x2e)
	endloop(0x04)

	label(0x2e)
	speak(CHR_P1P2, L_LUE_055, SFX_817E, CHANNEL_6, COLOR_09_BLUE) // "The hangar lift is on the other side of that huge ..."
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func101e_msg_triggerfinger[] = {
	beginloop(0x04)
		chr_toggle_p1p2(CHR_SELF)
		if_chr_in_room(CHR_P1P2, 0x00, 0x0051, /*goto*/ 0x2e)
	endloop(0x04)

	label(0x2e)
	speak(CHR_P1P2, L_LUE_056, SFX_817F, CHANNEL_6, COLOR_09_BLUE) // "Careful with that trigger finger, Agent Dark - you..."
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func0421_activate_autogun[] = {
	set_shotlist(GAILIST_ALERTED)

	beginloop(0x04)
		chr_toggle_p1p2(CHR_SELF)
		set_target_chr(CHR_P1P2)
		if_can_see_target(/*goto*/ 0x2e)
		if_heard_target_recently(/*goto*/ 0x2e)
		if_alertness(99, OPERATOR_GREATER_THAN, /*goto*/ 0x2e)
	endloop(0x04)

	label(0x2e)
	run_to_pad(PAD_LUE_0384)

	beginloop(0x09)
		if_object_in_good_condition(OBJ_AUTOGUN_AT_START, /*goto*/ 0x06)
		goto_next(0x0e)

		label(0x06)
		if_chr_stopped(/*goto*/ 0x2e)
	endloop(0x09)

	label(0x2e)
	chr_do_animation(ANIM_STANDING_TYPE_ONE_HAND, 0, 120, CHRANIMFLAG_SLOWUPDATE, 16, CHR_SELF, 2)

	beginloop(0x0a)
		if_chr_stopped(/*goto*/ 0x2e)
	endloop(0x0a)

	label(0x2e)
	if_object_in_good_condition(OBJ_AUTOGUN_AT_START, /*goto*/ 0x2e)
	goto_next(0x06)

	label(0x2e)
	unset_object_flag(OBJ_AUTOGUN_AT_START, OBJFLAG_DEACTIVATED)
	label(0x06)
	set_ailist(CHR_SELF, GAILIST_ALERTED)

	label(0x0e)
	say_quip(CHR_BOND, QUIP_SURPRISED, 0xff, 0x03, 0xff, BANK_0, 0x00, 0x00)
	restart_timer
	chr_do_animation(ANIM_SURPRISED_0202, 0, -1, 0, 16, CHR_SELF, 2)

	beginloop(0x7c)
		if_timer_gt(60, /*goto*/ 0x7d)
	endloop(0x7c)

	label(0x7d)
	set_ailist(CHR_SELF, GAILIST_ALERTED)
	endlist
};

/**
 * Randomly select one of two guards near the start to be the one who will
 * attempt to activate the autogun.
 */
u8 func1020_choose_autogun_guard[] = {
	yield
	call_rng
	if_rand_gt(128, /*goto*/ 0x2e)
	set_ailist(0x00, AILIST_ACTIVATE_AUTOGUN)
	set_ailist(CHR_SELF, GAILIST_IDLE)

	label(0x2e)
	set_ailist(0x01, AILIST_ACTIVATE_AUTOGUN)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func1021_damage_rl_guard[] = {
	yield
	damage_chr(CHR_ROCKETLAUNCHER_GUARD, WEAPON_SUPERDRAGON)
	yield
	damage_chr(CHR_ROCKETLAUNCHER_GUARD, WEAPON_SUPERDRAGON)
	yield
	damage_chr(CHR_ROCKETLAUNCHER_GUARD, WEAPON_SUPERDRAGON)
	yield
	damage_chr(CHR_ROCKETLAUNCHER_GUARD, WEAPON_SUPERDRAGON)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func1022_check_lift_switches_destroyed[] = {
	beginloop(0x04)
		if_stage_flag_eq(STAGEFLAG_LIFT1_CALLED, TRUE, /*goto*/ 0x06)
		if_stage_flag_eq(STAGEFLAG_LIFT2_CALLED, TRUE, /*goto*/ 0x06)
		if_object_in_good_condition(OBJ_LIFT1_SWITCH, /*goto*/ 0x2e)
		if_object_in_good_condition(OBJ_LIFT2_SWITCH, /*goto*/ 0x2e)
		show_hudmsg(CHR_BOND, L_LUE_057) // "Lift access terminals destroyed."
		set_stage_flag(STAGEFLAG_LIFT_SWITCHES_DESTROYED)
		goto_next(0x06)

		label(0x2e)
	endloop(0x04)

	label(0x06)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func1024_lift_door_sounds[] = {
	beginloop(0x7e)
		chr_toggle_p1p2(CHR_SELF)
		if_chr_activated_object(CHR_P1P2, 0x3c, /*goto*/ 0x0a)
		if_chr_activated_object(CHR_P1P2, 0x3e, /*goto*/ 0x0b)
		if_chr_activated_object(CHR_P1P2, 0x3d, /*goto*/ 0x41)
		if_chr_activated_object(CHR_P1P2, 0x3f, /*goto*/ 0x41)
		if_chr_activated_object(CHR_P1P2, 0x40, /*goto*/ 0x2e)
		if_chr_activated_object(CHR_P1P2, 0x41, /*goto*/ 0x2e)
		if_chr_activated_object(CHR_P1P2, 0x42, /*goto*/ 0x2e)
		if_chr_activated_object(CHR_P1P2, 0x43, /*goto*/ 0x2e)
		goto_first(0x7e)

		label(0x0a)
		if_door_locked(0x3c, 0x02, /*goto*/ 0x2f)
		goto_next(0x41)

		label(0x0b)
		if_door_locked(0x3e, 0x02, /*goto*/ 0x2f)
		goto_next(0x41)

		label(0x41)
		play_sound(SFX_01DC, -1)
		goto_next(0x06)

		label(0x2e)
		play_sound(SFX_DOOR_81B0, -1)
		goto_next(0x06)

		label(0x2f)
		play_sound(SFX_MENU_SELECT, -1)
		label(0x06)
		restart_timer

		beginloop(0x09)
			if_timer_gt(120, /*goto*/ 0x06)
		endloop(0x09)

		label(0x06)
	endloop(0x7e)

	endlist
};

u8 func1025_spawn_bunker_guards[] = {
	// This logic is pointless and all leads to label 0x04 anyway
	if_difficulty_gt(DIFF_SA, /*goto*/ 0x2e)
	goto_next(0x04)
	label(0x2e)
	if_difficulty_lt(DIFF_PA, /*goto*/ 0x0e)

	beginloop(0x04)
		yield
		yield
		yield
		yield
		if_stage_flag_eq(STAGEFLAG_EXPLOSIVES_PLACED, TRUE, /*goto*/ 0x2e)
		if_difficulty_lt(DIFF_SA, /*goto*/ 0x06)
		if_stage_flag_eq(STAGEFLAG_ANY_LASER_DESTROYED, TRUE, /*goto*/ 0x2e)
		label(0x06)
	endloop(0x04)

	label(0x2e)
	if_difficulty_lt(DIFF_SA, /*goto*/ 0x2e)
	if_stage_flag_eq(STAGEFLAG_ANY_LASER_DESTROYED, FALSE, /*goto*/ 0x0e)
	label(0x2e)
	restart_timer

	beginloop(0x60)
		try_spawn_chr_at_pad(BODY_A51AIRMAN, HEAD_RANDOM, PAD_LUE_0057, 0x0423, SPAWNFLAG_IGNORECOLLISION | SPAWNFLAG_BASICGUARD, /*goto*/ 0x0a)
	endloop(0x60)

	beginloop(0x0a)
		if_timer_gt(30, /*goto*/ 0x06)
	endloop(0x0a)

	label(0x06)

	beginloop(0x61)
		try_spawn_chr_at_pad(BODY_A51AIRMAN, HEAD_RANDOM, PAD_LUE_0050, 0x0423, SPAWNFLAG_IGNORECOLLISION | SPAWNFLAG_BASICGUARD, /*goto*/ 0x0b)
	endloop(0x61)

	beginloop(0x0b)
		if_timer_gt(60, /*goto*/ 0x06)
	endloop(0x0b)

	label(0x06)
	label(0x0e)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func0423_a5e8[] = {
	try_inherit_properties(0x25, /*goto*/ 0x06)
	label(0x06)
	set_alertness(100)
	set_self_flag_bankx(CHRFLAG0_CAN_HEAR_ALARMS, BANK_0)
	set_self_flag_bankx(CHRFLAG0_SKIPSAFETYCHECKS, BANK_0)
	set_self_flag_bankx(CHRFLAG0_AIVSAI, BANK_0)
	set_self_flag_bankx(CHRFLAG0_CAN_HEARSPAWN, BANK_0)
	try_equip_weapon(MODEL_CHRDRAGON, WEAPON_DRAGON, 0x00000000, /*goto*/ 0x06)
	label(0x06)
	set_chr_team(CHR_SELF, TEAM_ENEMY)
	yield
	yield
	yield
	yield
	yield
	yield
	yield
	yield
	yield
	rebuild_teams
	rebuild_squadrons
	set_ailist(CHR_SELF, AILIST_TROOPER_ALERTED)
	endlist
};

#define watch_for_laser_broken(crate1, crate2, laser) \
	if_difficulty_gt(DIFF_A, /*goto*/ 0x7e) \
	set_ailist(CHR_SELF, GAILIST_IDLE) \
 \
	/* SA and PA */ \
	beginloop(0x7e) \
		if_object_in_good_condition(crate1, /*goto*/ 0x2e) \
		goto_next(0x06) \
 \
		label(0x2e) \
		if_object_in_good_condition(crate2, /*goto*/ 0x2e) \
		goto_next(0x06) \
 \
		label(0x2e) \
	endloop(0x7e) \
 \
	label(0x06) \
	disable_object(laser) \
	set_ailist(CHR_SELF, AILIST_ACTIVATE_LASERS)

u8 func1026_check_laser1_broken[] = {
	watch_for_laser_broken(0x44, 0x45, 0x1e)
	endlist
};

u8 func1027_check_laser2_broken[] = {
	watch_for_laser_broken(0x46, 0x47, 0x1f)
	endlist
};

u8 func1028_check_laser3_broken[] = {
	watch_for_laser_broken(0x48, 0x49, 0x20)
	endlist
};

u8 func1029_check_laser4_broken[] = {
	watch_for_laser_broken(0x4a, 0x4b, 0x21)
	endlist
};

u8 func102a_check_laser5_broken[] = {
	watch_for_laser_broken(0x4c, 0x4d, 0x22)
	endlist
};

u8 func102b_check_laser6_broken[] = {
	watch_for_laser_broken(0x4e, 0x4f, 0x23)
	endlist
};

u8 func102c_check_laser7_broken[] = {
	watch_for_laser_broken(0x50, 0x52, 0x24)
	endlist
};

u8 func0424_activate_lasers[] = {
	if_difficulty_lt(DIFF_PA, /*goto*/ 0x2e)

	// PA
	label(0x7e)
	if_stage_flag_eq(STAGEFLAG_ANY_LASER_DESTROYED, TRUE, /*goto*/ 0x2e)
	set_stage_flag(STAGEFLAG_ANY_LASER_DESTROYED)
	if_stage_flag_eq(STAGEFLAG_EXPLOSIVES_PLACED, TRUE, /*goto*/ 0x2e)
	show_hudmsg(CHR_BOND, L_LUE_047) // "Intruder detected - security system online."

	// A and SA
	label(0x2e)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func0425_a7d4[] = {
	label(0x04)
	yield
	set_self_chrflag(CHRCFLAG_INVINCIBLE)
	set_self_chrflag(CHRCFLAG_UNEXPLODABLE)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

/**
 * This hidden guard is used as a template for cloning others.
 */
u8 func041c_template_guard[] = {
	label(0x04)
	set_self_chrflag(CHRCFLAG_HIDDEN)
	set_self_chrflag(CHRCFLAG_INVINCIBLE)
	set_self_chrflag(CHRCFLAG_UNEXPLODABLE)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func102d_check_antenna_switch_destroyed[] = {
	if_difficulty_lt(DIFF_SA, /*goto*/ 0x0e)

	beginloop(0x04)
		if_object_in_good_condition(OBJ_ANTENNA_SWITCH, /*goto*/ 0x06)
		goto_next(0x2e)

		label(0x06)
	endloop(0x04)

	label(0x2e)
	if_stage_flag_eq(STAGEFLAG_ANTENNA_LOWERED, TRUE, /*goto*/ 0x2e)
	show_hudmsg(CHR_BOND, L_LUE_042) // "Critical mission object destroyed."
	set_stage_flag(STAGEFLAG_ANTENNA_DESTROYED)
	label(0x2e)
	label(0x0e)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func102e_setup_rtracker[] = {
	yield
	set_object_flag3(OBJ_ROCKETLAUNCHER, OBJFLAG3_RTRACKED_BLUE)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func142f_setup_environment[] = {
	yield
	configure_environment(0x0000, AIENVCMD_00, FALSE)
	configure_environment(0x0000, AIENVCMD_01, FALSE)
	configure_environment(0x0000, AIENVCMD_02, FALSE)
	configure_environment(0x0000, AIENVCMD_03, FALSE)
	configure_environment(0x0000, AIENVCMD_04, FALSE)
	configure_environment(0x0001, AIENVCMD_ROOM_SETOUTDOORS, TRUE)
	configure_environment(0x0002, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x0002, AIENVCMD_ROOM_SETOUTDOORS, TRUE)
	configure_environment(0x0003, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x0004, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x0005, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x0005, AIENVCMD_ROOM_SETOUTDOORS, TRUE)
	configure_environment(0x0006, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x0006, AIENVCMD_ROOM_SETOUTDOORS, TRUE)
	configure_environment(0x0007, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x0007, AIENVCMD_ROOM_SETOUTDOORS, TRUE)
	configure_environment(0x0008, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x0008, AIENVCMD_ROOM_SETOUTDOORS, TRUE)
	configure_environment(0x000a, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x000b, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x000e, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x0010, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x0011, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x0012, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x0013, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x0013, AIENVCMD_ROOM_SETOUTDOORS, TRUE)
	configure_environment(0x0014, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x0014, AIENVCMD_ROOM_SETOUTDOORS, TRUE)
	configure_environment(0x0015, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x0015, AIENVCMD_ROOM_SETOUTDOORS, TRUE)
	configure_environment(0x0016, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x0018, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x0019, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x001a, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x001b, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x001c, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x001d, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x001e, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x001e, AIENVCMD_ROOM_SETOUTDOORS, TRUE)
	configure_environment(0x001f, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x001f, AIENVCMD_ROOM_SETOUTDOORS, TRUE)
	configure_environment(0x0020, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x0020, AIENVCMD_ROOM_SETOUTDOORS, TRUE)
	configure_environment(0x0017, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

struct ailist ailists[] = {
	{ func0401_start_path00,                   0x0401 },
	{ func0402_start_path01,                   0x0402 },
	{ func0403_start_path02,                   0x0403 },
	{ func0404_start_path03,                   0x0404 },
	{ func0405_start_path04,                   0x0405 },
	{ func0406_start_path05,                   0x0406 },
	{ func0407_start_path06,                   0x0407 },
	{ func0408_start_path07,                   0x0408 },
	{ func0409_set_rotor_speed,                0x0409 },
	{ func040a_top_interceptor,                0x040a },
	{ func040b_stop_vehicle,                   0x040b },
	{ func040c_init_bottom_interceptors,       0x040c },
	{ func040d_90c8,                           0x040d },
	{ func0411_init_hangar_guard1,             0x0411 },
	{ func0412_init_hangar_guard2,             0x0412 },
	{ func0413_init_hangar_guard3,             0x0413 },
	{ func0414_init_hangar_guard4,             0x0414 },
	{ func0415_alert_when_stopped,             0x0415 },
	{ func0416_mechanic,                       0x0416 },
	{ func0417_traitor,                        0x0417 },
	{ func0418_walk_to_pad,                    0x0418 },
	{ func040f_spawned_guard,                  0x040f },
	{ func040e_outro,                          0x040e },
	{ func0410_intro,                          0x0410 },
	{ func0419_clone_spawner,                  0x0419 },
	{ func041a_init_alerted_spawned_guard,     0x041a },
	{ func041c_template_guard,                 0x041c },
	{ func041b_alerted_spawned_guard,          0x041b },
	{ func041d_trooper_unalerted,              0x041d },
	{ func041e_dragon_unalerted,               0x041e },
	{ func041f_trooper_alerted,                0x041f },
	{ func0420_dragon_alerted,                 0x0420 },
	{ func0421_activate_autogun,               0x0421 },
	{ func0422_check_bug_wasted_target,        0x0422 },
	{ func0423_a5e8,                           0x0423 },
	{ func0424_activate_lasers,                0x0424 },
	{ func0425_a7d4,                           0x0425 },
	{ func0426_8420,                           0x0426 },
	{ func0c00_init_intro,                     0x0c00 },
	{ func040e_outro,                          0x0c01 },
	{ func1400_give_bugs,                      0x1400 },
	{ func1001_objectives_failed_msg,          0x1001 },
	{ func0c00_init_intro,                     0x1002 },
	{ func1003_check_bug_wasted_bond,          0x1003 },
	{ func1004_check_antenna_destroyed,        0x1004 },
	{ func1405_antenna_switch,                 0x1405 },
	{ func1006_lift_switches,                  0x1006 },
	{ func1007_check_hangar_accessed,          0x1007 },
	{ func1008_check_end_level,                0x1008 },
	{ func1009_check_radar_shut_down,          0x1009 },
	{ func100b_final_hangar,                   0x100b },
	{ func100c_maingate_switch,                0x100c },
	{ func140e_check_interceptors_destroyed,   0x140e },
	{ func1010_bunker_lighting,                0x1010 },
	{ func1011_bunker_explosives,              0x1011 },
	{ func1012_bunker_laser1,                  0x1012 },
	{ func1013_bunker_lasers,                  0x1013 },
	{ func1013_bunker_lasers234,               0x1014 },
	{ func1013_bunker_lasers56,                0x1015 },
	{ func1016_trigger_interceptor,            0x1016 },
	{ func1017_radar_terminal_noise,           0x1017 },
	{ func1018_unhide_guards,                  0x1018 },
	{ func1019_spawn_guards_at_antenna,        0x1019 },
	{ func101a_check_mechanic_dead,            0x101a },
	{ func101b_msg_airinterceptradar,          0x101b },
	{ func101c_msg_cantthrow,                  0x101c },
	{ func101d_msg_hangarlift,                 0x101d },
	{ func101e_msg_triggerfinger,              0x101e },
	{ func141f_start_lifts,                    0x141f },
	{ func1020_choose_autogun_guard,           0x1020 },
	{ func1021_damage_rl_guard,                0x1021 },
	{ func1022_check_lift_switches_destroyed,  0x1022 },
	{ func1023_check_bug_wasted_coop,          0x1023 },
	{ func1024_lift_door_sounds,               0x1024 },
	{ func1025_spawn_bunker_guards,            0x1025 },
	{ func1026_check_laser1_broken,            0x1026 },
	{ func1027_check_laser2_broken,            0x1027 },
	{ func1028_check_laser3_broken,            0x1028 },
	{ func1029_check_laser4_broken,            0x1029 },
	{ func102a_check_laser5_broken,            0x102a },
	{ func102b_check_laser6_broken,            0x102b },
	{ func102c_check_laser7_broken,            0x102c },
	{ func102d_check_antenna_switch_destroyed, 0x102d },
	{ func102e_setup_rtracker,                 0x102e },
	{ func142f_setup_environment,              0x142f },
	{ NULL, 0 },
};
